First part of AngularJS Training.
Covers details of AngularJs community and answers
- Why AngularJS ?
- What is AngularJS ?
- Getting started
- Basic Application layout and anatomies
- Data-binding, Existing Directives, Filters, Controllers
- Hosting on local (NodeJS) HTTPServer
Code samples available at
https://github.com/murtazahaveliwala/technext-angularjs-demo/tree/master/demos/static/angular-apps
2. Agenda
AngularJS: Introduction
Introduction to Single-Page-Apps
Understand what AngularJS is and why it's important
Installing AngularJS
Write your first AngularJS application
Understand Data-binding, Directives, Filters, Controller
& View
Run AngularJS application using HTTP server
3. Introduction
A 100% client-side and 100% JavaScript Framework
Free and open source (MIT License)
Built with modern development principles in mind
Flexible
Modularity
Versatility
Testability
Re-use, Less Code
SPA
Quick prototyping
Extensible
4. Introduction
Current Version - 1.2.27
Work in progress - 2.0 (to be mobile-first)
Has a port available in Dart (AngularDart)
Vibrant and growing community
Project homepage – angularjs.org
Guide – docs.angularjs.org/guide
API reference - docs.angularjs.org/api
Browser support – Firefox, Chrome, Safar, IE8+*
8. Traditional Apps – Multi-Page Apps
Full page reloaded on hopping
between pages
Server communication includes
all resources in a page
URLs look like –
domain.com/login.html,
domain.com/welcome.html
domain.com/search
Examples – Linkedin, NYTimes,
hrms
*Image courtesy: http://weblogs.asp.net/dwahlin/video-tutorial-angularjs-fundamentals-in-60-ish-minutes
9. Modern Apps – Single Page Apps
Optimized - pages do NOT reload
completely
Server communication reduces to
just data jsons or partial markups
URLs look like –
domain.com/app.html#login,
domain.com/app.html#welcome
domain.com/app#!search
Examples – Gmail, Twitter,
Facebook etc.
*Image courtesy: http://angularjs-demo-app.herokuapp.com/
11. AngularJS Features
Data-binding
Directives
Dependency Injection
Form Validation
Server Communication
Localization
Embeddable
Plain JavaScript
etc.
22. Controllers
Used to provide business logic, methods for the view
Makes use of “Services”
Provided with “scope” object
Dependencies are “injected”
23. Views
Used for interaction by user
Simple HTML, CSS files
Can work on models directly
Recommendation
Use controllers for any manipulations
Use directive for explicit HTML manipulations
Useful Directives – ng-controller, ng-include, ng-view
27. References
Articles
AngularJS official guide
Use AngularJS to power your application
Why does AngularJS rock?
Rapid prototyping with AngularJs
AngularJs Form Validation
Videos
Official YouTube channel
AngularJs Fundamentals in 60-ish minutes
Writing Directives
Introduction to AngularJs Unit Testing
End to End testing of AngularJs apps with Protractor