There is a notion of Angular 3D: Directives, Data binding, and Dependency injection.
Through the concept of directive Angular turns HTML into DSL, Domain Specific Language. Directives are a way to teach HTML new tricks, make custom components, and simplify DOM manipulation. During DOM compilation directives are matched against the HTML and _executed_. This allows directives to register behavior, or transform the DOM. Directives are unique to Angular.
Data-binding in Angular web application is the automatic synchronization of data between the model and view components. Model binds to the view in single directional manor or form in bi-directional manor. Model is the single-source-of-truth in the application. You don’t query the DOM, you don’t update the DOM, you don’t talk to the DOM, DOM just happens to be the projection on the current model. The model is the truth. If you want to read the current state of the form, you go to the model, if you want to change the current state of the form, simply go to the model and update the model.
As Miško Hevery mentioned in “Re-Imagining the Browser with AngularJS”, the data binding should really be part of the browser and Angular team has been working on a spec called model driven view and a child spec called object observe. They are trying to bring the native implementation of data binding into the browser and browser should embrace data binding.
Dependency Injection is a core to Angular. DI allows less code and more extensibility. Angular DI is the key to making easily testable components.
Each AngularJS application has a single $injector that gets created when the application first starts; you can get a hold of it by injecting $injector into any injectable function. Any time you write a function that takes injected arguments, you’re seeing the injector at work.
There Are More Important Angular Concepts
Module, controller, scope, factory, filter, compile, link, route, promises, unit-testing, e2e=testing, watching on variables, notes on each individual concept are coming…
AngularJS is very comprehensive. Even though the team building it is small with only 6 people, the core people Miško Hevery (father of AngularJS), Vojta Jina (creator of Karma), and Igor Minar (team leader, Continuous Integration Testing or CI guy) are great visionaries. Choosing AngularJS to build the new web application = preparing for the future standards.
The web is moving towards a data driven architecture, where browsers are responsible for dynamic rending and two way data binding. This tweet from John Whish: “I’m pretty sure that HTML6 is going under the cod ename Angular JS” is not rootless.
Great Links to Get Started with AngularJS
- AngularJS Best Practices
- Design Decisions in AngularJS
- Re-Imagining the Browser with AngularJS
- Bringing Angular Apps to Life with Animation by Miško Hevery
- Testing Directives
- Dependency Injection and App Demos
- Yeoman Generator for AngularJS
- Neat Things Built with AngularJS
- My Top 5 AngularJS Demo Applications