Angular js presentation at Datacom

13
An Introduction to Angular JS

Transcript of Angular js presentation at Datacom

Page 1: Angular js presentation at Datacom

An Introduction to Angular JS

Page 2: Angular js presentation at Datacom

AgendaOverview of Angular framework

Discuss the basic core features and functionality

Develop a demo web application

Page 3: Angular js presentation at Datacom

What is Angular JShttps://angularjs.org/

Angular JS is JavaScript framework for building rich

web application based on the power of JavaScript, CSS

and HTML5 in modern browsers.

Open Source (@ github)

Funded by Google

Cross Platform

Page 4: Angular js presentation at Datacom

Single Page Application

Reduce page reloading round trip

On-demand loading resources

Talks to API for data

SEO challenges

Page 5: Angular js presentation at Datacom

Application require more interactivityAutomatic refresh (notifications)

More Animations

Fast editing

More speed

Page 6: Angular js presentation at Datacom

Thick Server, Thin Client

Client Side • DOM Manipulation • Javascript• JQuery

Server Side • Routing• View Layer• Application Logic• Persistence

• ASP.NET• PHP• Ruby• JSP• XML

Page 7: Angular js presentation at Datacom

Thin Server, Thick Client

Client Side • DOM Manipulation• Animation• Routing• View layer• Application Logic

• Angular JS• Backbone• Ember• Knockout• Require JS

Server Side • Persistence • Node JS• REST

Page 8: Angular js presentation at Datacom

The Rise of JavaScript Libraries

Page 9: Angular js presentation at Datacom

Why AngularJSSeparation of concerns

Dependency Injection

Two way binding

Lots of built-in and open source directives

Routing support

Built with testability in mind

Filters and events

Page 10: Angular js presentation at Datacom

DirectiveIndex.html

<div ng-controller="Controller">

<div my-customer></div>

</div>

Scirpt.js.directive('myCustomer', function() {

return {

template: 'Name: {{customer.name}} Address: {{customer.address}}'

};

Page 11: Angular js presentation at Datacom

Bootstrap

Page 12: Angular js presentation at Datacom

Digest cycle and $watch list

Page 13: Angular js presentation at Datacom

Demo – work flow

NPM Install core tools

Yeoman Create a new webapp

Bower Handle dependencies

Grunt Preview, test, build

Demo App URL: http://wordpress.com/fresh/ API: https

://public-api.wordpress.com/rest/v1/freshly-pressed?number=20&fields=editorial