AngularJS
-
Upload
malin-de-silva -
Category
Technology
-
view
97 -
download
2
description
Transcript of AngularJS
![Page 1: AngularJS](https://reader035.fdocuments.in/reader035/viewer/2022070322/5592344d1a28ab72778b45b9/html5/thumbnails/1.jpg)
INTRODUCTION TO
Malin De SilvaSharePoint SpecialistExilesoftmalindesilva.net
![Page 2: AngularJS](https://reader035.fdocuments.in/reader035/viewer/2022070322/5592344d1a28ab72778b45b9/html5/thumbnails/2.jpg)
OVERVIEW
• Introduction
• AngularJS Directives
• Demonstrations
• Other features
![Page 3: AngularJS](https://reader035.fdocuments.in/reader035/viewer/2022070322/5592344d1a28ab72778b45b9/html5/thumbnails/3.jpg)
STATIC HTML VS DYNAMIC HTML
• HTML works great with static content
INTRODUCTION
• How about dynamic content?
![Page 4: AngularJS](https://reader035.fdocuments.in/reader035/viewer/2022070322/5592344d1a28ab72778b45b9/html5/thumbnails/4.jpg)
STATIC HTML VS DYNAMIC HTMLINTRODUCTION
Lines : 19 14Characters: 527 296
![Page 5: AngularJS](https://reader035.fdocuments.in/reader035/viewer/2022070322/5592344d1a28ab72778b45b9/html5/thumbnails/5.jpg)
TWO WAY BINDINGINTRODUCTION
![Page 6: AngularJS](https://reader035.fdocuments.in/reader035/viewer/2022070322/5592344d1a28ab72778b45b9/html5/thumbnails/6.jpg)
MODEL – VIEW - WHATEVER
Model – View – Controller+
Model – View – Presenter+
Model – View – ViewModel+…=
Model – View - Whatever
INTRODUCTION
![Page 7: AngularJS](https://reader035.fdocuments.in/reader035/viewer/2022070322/5592344d1a28ab72778b45b9/html5/thumbnails/7.jpg)
SETTING UP
• Minified and non-minified versions• Online and offline reference
• Feature downloads
INTRODUCTION
• angular-mocks.js• angular-scenario.js• angular-loader.min.js
• angular-animate.js• angular-cookies.js• angular-resource.js
• angular-route.js• angular-sanitize.js• angular-touch.js
![Page 8: AngularJS](https://reader035.fdocuments.in/reader035/viewer/2022070322/5592344d1a28ab72778b45b9/html5/thumbnails/8.jpg)
DirectivesANGULARJS
Directives are markers on a DOM element that tells AngularJS’s HTML Compiler to attach a specified behavior to that DOM element or even transform that DOM element and its children.
![Page 9: AngularJS](https://reader035.fdocuments.in/reader035/viewer/2022070322/5592344d1a28ab72778b45b9/html5/thumbnails/9.jpg)
DirectivesANGULARJS
• ng-app - designates the root element of the application
• ng-model - binds a control to a property on the scope
• ng-click - specify custom behavior when an element is clicked
• ng-repeat - instantiates a template once per item for a collection
• ng-init - evaluate an expression in the current scope
• ng-controller- attaches controller class to the view
More…
![Page 10: AngularJS](https://reader035.fdocuments.in/reader035/viewer/2022070322/5592344d1a28ab72778b45b9/html5/thumbnails/10.jpg)
DEMONSTRATIONS
• Demo 1: ng-app and ng-model
• Demo 2: ng-init and ng-repeat with ordering and filtering
• Demo 3: Using controllers$scope
• Demo 4: ng-click
Modules
Two-way binding
![Page 11: AngularJS](https://reader035.fdocuments.in/reader035/viewer/2022070322/5592344d1a28ab72778b45b9/html5/thumbnails/11.jpg)
OTHER FEATURES
• Config• Routes• Factory• Provider• Service• Value