adobe / aem-spa-project-archetype

Maven Archetype for creating new AEM SPA projects
Apache License 2.0
61 stars 32 forks source link

[Angular] CustomModelClient purpose unclear #58

Closed davidjgonzalez closed 4 years ago

davidjgonzalez commented 5 years ago

https://github.com/adobe/aem-spa-project-archetype/blob/4ce2eaa02d49cedef6e68a29a5f613360862d9a0/src/main/resources/archetype-resources/angular-app/CustomModelClient.js#L27

It appears that the CustomModelClient was accidentally left over (it is floating outside the /app folder). This file is also ~undocumented making it confusing as to its purpose and/or how/when to use it.

I'd recommend moving sample snippets into documentation, and documenting them well.

See how the angular project tackles exposing sample/illustrative code for ideas: https://angular.io/guide/http#intercepting-requests-and-responses

pfauchere commented 5 years ago

The DEVELOPMENT.md file [0] contains some vague explanation of when and how to use the CustomModelClient class. We recently made some change in the React project where we conditionally use the CustomModelClient when starting the development server. We should probably align the Angular project accordingly.

[0] https://github.com/adobe/aem-spa-project-archetype/blob/development/src/main/resources/archetype-resources/angular-app/DEVELOPMENT.md

pfauchere commented 5 years ago

Could be resolved when working on https://github.com/adobe/aem-spa-project-archetype/issues/74