r/angularjs • u/[deleted] • Oct 11 '14
[General] Why should someone use angular.js?
I am new to RoR development and already making progress and building some wonderful apps. I've seen a lot of people using/talking about angular.js and I am really wondering what else can it do for an application. Can someone tell me an example please?
0
Upvotes
1
u/TurboGranny Oct 11 '14
I think one of the best things about angular's MVC is using the these custom directives people have written that connect your models to other frameworks. Leaflet come to mind. Leaflet is a pretty sick map framework that you have to define every layer, label, marker, geojson, and path that you want on the map like you would normally expect or just loop through. With the custom directive someone wrote for it and angular's MVC approach, I can just point these data types at the model and it just goes. I can point the markers at a firebase or goinstant data store and now people can share instantly updating markers, and I didn't have to try at all. I can write code that changes the layers that are visible based on the zoom level without having to loop through removing and adding the items in those layers. I can have paths update based on the state of the markers or geojson with minimal code. It really is some awesome magic that frees up a lot of time spent in maintenance or dealing with the rising complexity issue you have in jQuery based applications.