Saturday 29 April 2017

Address bar and Angular 2 Routing with express

Ok, so I'm building an angular app and I need some clarification.

I have an express backend and am using Angular 2. So when I type in a url that is an angular route but not an express route into the address bar, it 404s while using routerlink='data' works.

My understanding of this is to do something like router.get('*', function(req, res) { render('angularApp') }

Now, if I build an api on the backend, won't this make the API unreachable? If so, how do I get around this?



via QueSo

No comments:

Post a Comment