I'm migrating a fully functional Angular SPA into AEM 6.5. Only a few pages will need authoring but the rest of the application will not need it. The application uses lazy loading and static routing. I'm aware of the Dynamic Routing rule of SPA Architecture. And I'm including dynamic routing for AEM only pages following: Getting Started with Angular and AEM SPA Editor - Chapter 2.
Currently, for non AEM pages with static routes, I see errors for x.model.json not being found. This makes sense since page "x" is not in AEM.
What is the best way to manage routing between non AEM pages with static routes and Angular/AEM pages? Is it possible to prevent the model service from looking for models in non AEM pages?
Adding reference to the SPA Design Model we are using.
SPA Design Model. Source
Design Model | Advantages | Disadvantages |
The front end developer uses the SPA Editor SDK framework but only opens some areas to the content author. | The developer keeps control over the app by only enabling authoring in restricted areas of the app. | Content authors are restricted to a limited set of AEM's content authoring experience. The code risks being neither portable nor reusable if it contains static references or routing. Does not allow use of the template editor so the front end developer must maintain editable templates via the JCR. |