0

I am trying to load a yeoman angular app only once the user hits a specific page inside of express (e.g. '/dashboad').

The end goal is to have multiple static front pages on express without using angular. Then I would use the angular routes/ application once a user has logged in.

I have successfully followed Yeoman inside ExpressJS but this boots up angular right from the start and does not allow routing to any express html pages.

Community
  • 1
  • 1

1 Answers1

0

We already chatted about this in person, but the answer here is to not have your Angular app be the base route in Express. You would have separate routes in Express for each of the static pages and finally one route for the Angular page. For example:

/ => /index.html  
/dashboard/ => /dashboard.html (this is the Angular app)  
/faq/ => faq.html 

As long as the Angular app script is not loaded outside the one Angular route, everything will work as you expect.