Thanks!--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/wLwdBhGEiQcJ.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.
That's really is with AngularJS!
The live example:
http://cburgdorf.github.com/angular-todo-app/
A clean body with Templates/VM getting bound to it dynamically:
https://github.com/cburgdorf/angular-todo-app/blob/master/app/index.html
You can rely on the routing to manage that for you. Just specify the template and the VM to be mapped inside the body, depending on the current route:
https://github.com/cburgdorf/angular-todo-app/blob/master/app/js/services.js
That's part of what I had in mind with this point. I ment switching from one *independent* VM to another without each knowing the other.
But chances are high that you mean it in another sense. So, you might be interested in this thread which discusses how to leverage shared services to share state between VMs:
https://groups.google.com/forum/m/#!topic/angular/DlcI466OAvk
Hope it helps,
Christoph
https://groups.google.com/forum/m/#!topic/angular/DlcI466OAvk