angularjs - Best practice using angular architecture with components -


i'm trying wrap mind arround angular components, understand components better i'm developing simple todo crud using component architecture.

the problem think makes sense put operations of crud in single controller respecting single responsibility principle @ same time practice (i think) split views (one list todos , delete create/update todos).

i know multiple views single controller can achieved using 2 separate components registering same controller , ng/ui-route magic, using blows encapsulation proposal components try offer.

so, has figured out solution problem?

i think have consider modularity, can use create service handle crud , api operations , can reused other controllers , directives. here example of how did in our project. git repo of on of partners.

https://github.com/leog/epsilon


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -