Does it work with angular 2 , and if so .
can you provide any tutorial on that ?
Thanks
Hi @amrayoub !
It works on any frontend framework you wanna use (Angular, Angular 2, Ember, React, VueJS, Aurelia, Elm, ...).
SPA sharing the same domain
If you want to have your application and your endpoint on the same domain you need to configure Nginx to serve every requests to your index.html and whitelist /api/ (or whatever url you have for your endpoint) to go to your Adonis application.
SPA and endpoint separated
It's better in my opinion to separate by a domain your api and your application (api.example.com, example.com). If you do that you will only need to configure Nginx to redirect every request going to example.com to your index.html file.
@amrayoub This question is like you to ask if CakePHP/Zend/Symfony/Laravel/Silex works with angular2. Right @RomainLanz ?
Yes.
Frontend stuff do not depend on the backend technologies/frameworks.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Hi @amrayoub !
It works on any frontend framework you wanna use (Angular, Angular 2, Ember, React, VueJS, Aurelia, Elm, ...).
SPA sharing the same domain
If you want to have your application and your endpoint on the same domain you need to configure Nginx to serve every requests to your
index.htmland whitelist/api/(or whatever url you have for your endpoint) to go to your Adonis application.SPA and endpoint separated
It's better in my opinion to separate by a domain your api and your application (
api.example.com,example.com). If you do that you will only need to configure Nginx to redirect every request going toexample.comto yourindex.htmlfile.