I am looking for implementing ERP frontend in angular 2. I have my exisiting implementation in codeigniter HMVC structure.From which I have converted all models/controllers calls in to REST APIS.
The older structure was reusing lots of view component for CRUD operations in modules such as CRM, Accounting, Transactions etc etc.
I have doubt that is there any way to achieve the same pattern in Angular 4 with more optimization.
I have looked at shared services and it looks very promising. In short I am looking for correct modular structure in angular which somehow helps me to convert old HMVC codeigniter module structure.
If you need more implementation regarding new and old structure. Let me know.
I highly recommend following the Angular.io style guide for structuring an Angular application. These guidelines favor simplicity through consistent application of the LIFT principle over the traditional approach to organizing code such as grouping related components into separate folders (i.e. having a model layer, a services layer, etc). This will allow your application to scale over time as it evolves from a very simple application with fewer than ten files to more full-featured complex applications with over hundreds or even thousands of files.
https://angular.io/guide/styleguide#application-structure-and-ngmodules
Highlights:
forRoot
and forChild
convention to ensure services are close to the module where they are used (LIFT), while still allowing them to be registered as app-wide singletons.Here is a compliant example folder structure:
https://angular.io/guide/styleguide#overall-structural-guidelines