20
ANGULARJS A Gentle Introduction John Ptacek/@jptacek [email protected] Madison .NET User Group

ANGULARJS A Gentle Introduction John Madison.NET User Group

Embed Size (px)

DESCRIPTION

OVERVIEW

Citation preview

Page 1: ANGULARJS A Gentle Introduction John  Madison.NET User Group

ANGULARJSA Gentle Introduction

John Ptacek/@[email protected]

Madison .NET User Group

Page 2: ANGULARJS A Gentle Introduction John  Madison.NET User Group

• AngularJS Overview• Demos

AGENDA

Page 3: ANGULARJS A Gentle Introduction John  Madison.NET User Group

OVERVIEW• http://alicialiu.net/leveling-up-angular-talk/#/

Page 4: ANGULARJS A Gentle Introduction John  Madison.NET User Group

• Framework. NOT a Library-Contains everything you need for SPA

• Broken into components– Controllers, view, models, services, etc

• MVC/MVVM Framework• Two Way Data binding• Enables test friendly code

ANGULARJS – THE WHY

Page 5: ANGULARJS A Gentle Introduction John  Madison.NET User Group

• Performance- Framework not a library- Functions, not computed properties

• Directives– Powerful, not always intuitive

• Documentation

ANGULARJS – THE WHY NOT

Page 6: ANGULARJS A Gentle Introduction John  Madison.NET User Group

• Get AngularJS– https://angularjs.org/

• Bootstrap– http://getbootstrap.com/

DEMO 0 - GROUNDWORK

Page 7: ANGULARJS A Gentle Introduction John  Madison.NET User Group

• Ng-app, ng-model• Magical {{}}• Filters– http://docs.angularjs.org/api/ng#filter

DEMO 1 - INTRO/DATA BINDING

Page 8: ANGULARJS A Gentle Introduction John  Madison.NET User Group

• Ng-controller– http://docs.angularjs.org/api/ng.$controller

• Magical $scope– View model– Object context– Both controllers and directives have access to scope,

but not each to other

DEMO 2 - CONTROLLERS

Page 9: ANGULARJS A Gentle Introduction John  Madison.NET User Group

• Directives– HTML Dom markers (attributes, css class, etc)– http://docs.angularjs.org/guide/directive

• Ng-repeat– http://docs.angularjs.org/api/ng.directive:ngRepeat

• Ng-filter– http://docs.angularjs.org/api/ng.filter:filter

DEMO 3 –REPEAT

Page 10: ANGULARJS A Gentle Introduction John  Madison.NET User Group

• Order By– http://docs.angularjs.org/api/ng.filter:orderBy

DEMO 4 – ORDER

Page 11: ANGULARJS A Gentle Introduction John  Madison.NET User Group

• Custom Logic• Custom Filter function• $log

DEMO 5 – FUNCTIONS

Page 12: ANGULARJS A Gentle Introduction John  Madison.NET User Group

• Ng-show/ng-hide– http://docs.angularjs.org/api/ng.directive:ngShow#!– http://docs.angularjs.org/api/ng.directive:ngHide

• Ng-click– http://docs.angularjs.org/api/ng.directive:ngClick

• Directives– http://docs.angularjs.org/api/

DEMO 6 - DIRECTIVES

Page 13: ANGULARJS A Gentle Introduction John  Madison.NET User Group

• Binding Images• And something really cool

DEMO LOU – A BRIEF INTERLUDE

Page 14: ANGULARJS A Gentle Introduction John  Madison.NET User Group

• Enable controlling of UX• Separate work large products• http://docs.angularjs.org/guide/templates#!

DEMO 8 – TEMPLATES

Page 15: ANGULARJS A Gentle Introduction John  Madison.NET User Group

• Encapsulate logic– Linked together via Dependency injection– http://

docs.angularjs.org/guide/dev_guide.services.creating_services

• Promises - $q– http://docs.angularjs.org/api/ng.$q

DEMO 9 - SERVICES

Page 16: ANGULARJS A Gentle Introduction John  Madison.NET User Group

• Create new elements!

DEMO 10 – DATA BINDING

Page 17: ANGULARJS A Gentle Introduction John  Madison.NET User Group

• Ng-route JavaScript• Dependency Injection• $routeProvider and route creation• Introduce ng-view

DEMO 11 – ROUTES

Page 18: ANGULARJS A Gentle Introduction John  Madison.NET User Group

QUESTIONS

Page 19: ANGULARJS A Gentle Introduction John  Madison.NET User Group

August 11th - 13th

2014 Kalahari

Resort Wisconsin

Dellshttp://ThatConference.com

Page 20: ANGULARJS A Gentle Introduction John  Madison.NET User Group

John PtacekSkyline Technologies

[email protected]

@jptacek / www.jptacek.com

THANK YOU!!