You can use data-ng-* too http://news.ycombinator.com/item?id=4113317
> The "Reusable Components" section states "This lets you focus either on what the application does or how the application looks separately."
This is based on the Web Component spec that many agree is the future of the web, including the twitter bootstrap crew (https://twitter.com/sayrer/status/208662599842283522).
The Web Component spec[1] examples always have the template in plain HTML, wrapped in a <template> and separate from any JavaScript. Searching the AngularJS site, there are zero references to "Web Components". Web Components are so new that the spec still has Norse mythology references, so a reference from Angular to the spec would be a big help.
More importantly, while Angular has been duplicating the functionality of Underscore and jQuery, the rest of the JS world is extending itself with CommonJS modules according to spec. Half of the builtwith.angularjs.org examples include jQuery anyway. Angular's attempt to be a complete "end-to-end solution" may easily make it a jack-of-all-trades, master of none. This also seems at odds with its focus on being a component.
Lastly, I am not the first person to raise these concerns.[2]
[1] http://dvcs.w3.org/hg/webcomponents/raw-file/tip/explainer/i...
[2] https://groups.google.com/group/angular/tree/browse_frm/mont...
From one of AngularJS author:
> AngularJS is our testbed to see what works and what doesn't. We are taking the best ideas from angular and use them to shape the (Web Components) specs (and the other way around too!). As the first step, we are hoping to start to replace some pieces of angular when native apis are available. we'll see how far we'll get with this approach. What is important is that Angular can help you start thinking in the way that will be required for using these native apis and believe me that is a huge plus already.
So not only do they care about Web Components, they are using AngularJS to shape the specs and vice versa. Hard to be more standard than given that the specs are still unstable.
About being able to re-use the code on server side, I don't care about that, I write my apps in ruby anyway and this is out of scope of a JS MVC anyway. The only people that might care about that are Node users, and most people don't use Node or other js server side. So that's a non issue.
Having couple of util methods (forEach, isFunction, etc...), is just so that Angular can work without any other dependency, which many projects actually do. However you are free to use underscore, jquery and other libraries...
Jasmine ? Yep, we like it and we use it. Angular DOES use jasmine as its unit testing framework + we provide some helpers to make your life with jasmine + angular easier. But again, you can use any testing framework you like.
Angular is server agnostic. However, we have some ideas and plans how to do server side prerendering, so I believe it will come...
are you sure about that? pretty sure it uses Jasmine.
From the tutorial: "Angular developers prefer the syntax of Jasmine's Behavior-driven Development (BDD) framework when writing tests. Although Angular does not require you to use Jasmine, we wrote all of the tests in this tutorial in Jasmine. "
[1] http://docs.angularjs.org/guide/dev_guide.unit-testing
[2] http://docs.angularjs.org/guide/dev_guide.services.testing_s...
Angular adds some sugar on top for end to end UI testing.
The "Reusable Components" section states "This lets you focus either on what the application does or how the application looks separately." However, directly below is a view (template) stuffed in a controller as a string. AngularJS uses a "ng-" namespace for data whereas Knockout and others use the HTML5 "data-" spec. These seem like a step backwards, and behind what is found in Backbone, Spine, Ember, or Knockout.
Angular also includes its own forEach, JSON parsing, isArray, isElement, isFunction, isObject, isUndefined, noop and Promises methods (and more!). Other frameworks instead rely on existing, familiar libraries like jQuery or Underscore. It even has its own Uppercase and Lowercase methods, despite existing already in native JS. Even on the AngularJS website jQuery is included, therefore many of these methods unnecessarily exist twice.
Rather than use the existing event bindings, Angular has recreated them all with an "ng" prefix. Angular also has its own testing suite rather than integrating one of the existing popular JS test frameworks like Jasmine.
Angular doesn't seem to have any serverside equivalent for its proprietary design, so creating a fallback for less rich clients will be difficult.
I am striving to understand the distinct advantage of AngularJS, however mostly what I see is just reinventing the wheel. With so many proprietary methods, the learning curve is steeper than using a popular framework like Spine which is already extensible with common modules. It is a good effort, but against its comparables it has catching up to do.