Angular js A Google Framework
In this article we will be laerning about what is Angular. Why Angular is better than other framework is the best practice in industry. we will also go through the following
History
Why AngularJS
Overview
Sample Demo Applications
AngularJS vs KnockOut
AngularJS History
AngularJS framework is maintained by Google.
Developed in 2009 by Misko Hevery and Adam Abrons.
Version 1.0 of AngularJS was released in December 2012.Why AngularJS
Backed by Google
Two-way data binding
Templates
Routing
Plays nicely with other JS libraries
Testability
Very active development and Community
Good Documentation
MIT LicensedFew Important Directives
Ng-App : The ng-App directive is typically placed near the root element of the page - e.g. on the or tags.
Ng-Model: It is responsible for binding the view into the model
ng-controller : It is a function that Angular invokes. Controller takes a $scope parameter, Attach model to $scopeGetting Started
Two requirements:
- Add a <script> tag pointing to angular.js
- Add an ng-app attribute in your HTML
- ng-app is an Angular Directive
Data Binding
Ng-Model is responsible for:
Binding the view into the model, which other directives such as input, textarea or select require.
Providing validation behavior (i.e. required, number, email, url).
Controllers and Modules
Controller is a function that Angular invokes. Controller takes a $scope parameter.
Modules: Controllers usually live in modules. So Avoids the global namespaceAngularJS Vs Knockout
AngularJS
MV* Framework
Data binding(Dirty Checking)
Templating
Routing
Reusable Components
Dependency Injection
Deep-linking
Knockout
Model-View-View Model (MVVM) Library
Data binding(Observables)
Templating