|
|
|
|
|
by zoomerang
4429 days ago
|
|
Look a little closer - It's not about saving bytes. I ended up coming up something very similar for my projects and it made a notable difference in defect rate. - Removes the need for positional arguments for constructor injection, so you only have to list your dependencies once. This one seems minor but can be a major frustration and a source of bugs when working with lots of services. - Moves actions out of the scope and onto the controller itself, where they belong. - Provides a clean template structure for other project members to work off that guides you to nicely structured and properly separated code (i.e. Watches in one section). This seems minor, but when you're working with multiple junior developers it starts to become a big deal very quickly. You can do all this without using a third party project, but if you're new to Angular this is a nice bootstrap and helps guide you towards a solution that avoids a lot of warts in the framework. |
|
Based on the Classy's docs, it doesnt "move" actions out of the scope and onto the controller, but the other way around. It adds controller's actions to the scope unless you prefix the names with an underscore.
Based on my experience debugging angular performance issues associated with expensive $digest cycles, I do NOT WANT it to happen automagically. I only want those functions on the scope that i explicitly place there.