Answer the question
In order to leave comments, you need to log in
How to make a hybrid of SPA and classics?
before the advent of angular, projects looked like this
$app->get('/', function () {
......
});
$app->get('/auth', function () {
......
});
$app->get('/admin', function () {
......
});
$app->get('/admin/orders', function () {
......
});
$app->get('/admin/users', function () {
......
});
$app->run();
$app->get('/', function () {
exit(file_get_contents('/ng-application/front/index.html'))
});
$app->get('/admin/orders', function () {
exit(file_get_contents('/ng-application/admin/orders/index.html'))
});
$app->get('/admin/users', function () {
exit(file_get_contents('/ng-application/admin/users/index.html'))
});
Answer the question
In order to leave comments, you need to log in
on a REST server, the client knows nothing about the server except that REST is there. That is, no html on the server. everything on the client. From the server spits json-nom.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question