Reuse components in AngularJS -


as new angularjs developer (coming php+laravel world) i'm facing troubles designing architecture of new app. best way implement crud app entities used more once along app?

for example: have entities 'document' , 'project'. documents can listed , viewed alone, can attached projects. inside project detail view include attached documents, using same template used when listing documents alone. widget should have own controller , methods, since need make api calls , apply business logic; , receive parent project data in way.

what should use document listing? directive, ng-include or other?

you should use module use reusing component. https://docs.angularjs.org/guide/module


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -