by ldn_tech_exec1 · 13y ago · 0 comments
http://brandid.github.io/parse-angular-demo/
"In AngularJS, every time you visit a route, it passes an idand has to resolve it in your controllers."
- not true, just use nested controllers and prototypical inheritance to access the already resolved object
"AngularJS doesn’t follow this philosophy; it encourages you to throw away what you already had and find it again (probably from the server!)."
- not true, thats why $rootScope exists
"None of the examples or blogs I read through demonstrated how to reuse object instances, for example. Is that just not done in AngularJS?"
- not true, all scopes inherit from each other, javascript prototypical inheritance applies
"The problem is that the $watch function belongs to the $scope and NOT the Room."
- not true, you can put a $watch on the model if use Backbone for your models
"If you had an array of Room instances for example, you can’t watch them all without looping through them all constantly."
- not true, you can watch a collection of models, and you can do things like watch the length of the array for less processor intensive use of $watch
If you're arguing that with a bunch of extra code on top of AngularJS it does what Ember does out of the box, that was kind of my point.
What's your take on points #1, #2, #3 and #5?
What you are suggesting is good practice but something that I suspect very few Angular developers do as it's not encouraged by the framework itself.
If you follow the guides on the official Angular site, they're done none of the things you suggest.
If you're argument is about what Ember 'encourages' vs what AngularJS 'encourages', that is your opinion and not a weakness in the framework.
I think it's great you've taken some time to learn AngularJS, and I think if you dig a little deeper you will be pleasantly surprised with what you find.