SlideShare a Scribd company logo
Beginner’s Workshop
Sathish VJ
History
‱ Origins within Google, invented by Misko
Hevery
‱ Open-sourced 2009
‱ 17,000 lines in 6 months => 1,500 in 3 weeks
Killer Features
‱
‱
‱
‱

Two-way binding
Declarative coding for UI
Teaching HTML new tricks
Separation of model & view, No DOM/View
manipulation, less code
‱ Great for CRUD based single page apps
‱ Awesome adoption and great community
‱ Unit testable, E2E testable
Main site, Download
‱ angularjs.org
Ex 1: ng-app, expression binding
‱ Download
https://github.com/sathishvj/AngularJSTutoria
ls/archive/master.zip
‱ Extract locally
‱ Go to 01-ngApp-binding
‱ Open html in browser
‱ Examine source code
Ex 1: ng-app, expression binding
Ex 1: ng-app, expression binding
‱ Include angular.js or angular.min.js
‱ Add ng-app declarative where you want
Angular to manage app (typically <html> or
<body>)
‱ Expression binding with {{ }}
‱ ng-app can also be written as ngApp
‱ Use camel case in JavaScript code (ngApp) and
use snake case in html (ng-app)
How does it work
‱ Compile: traverse the DOM and collect all of
the directives. The result is a linking function.
‱ Link: combine the directives with a scope and
produce a live view.
Ex 2: ngModel, binding variables
‱ 02-ngModel
‱ ng-model binds variable data. It can be
declared on input, select, textarea, etc.
Two-way data binding
Other in-built declarations in Angular
ngApp ngBind ngBindHtml ngBindTemplate ngBlur
ngChange ngChecked ngClass ngClassEven
ngClassOdd ngClick ngCloak ngController ngCopy
ngCsp ngCut ngDblclick ngDisabled ngFocus ngForm
ngHide ngHref ngIf ngInclude ngInit ngKeydown
ngKeypress ngKeyup ngList ngModel ngMousedown
ngMouseenter ngMouseleave ngMousemove
ngMouseover ngMouseup ngNonBindable ngOpen
ngPaste ngPluralize ngReadonly ngRepeat
ngSelected ngShow ngSrc ngSrcset ngStyle
ngSubmit ngSwitch ngTransclude ngValue
Ex 3: jquery comparison
‱ 03-jquerycomparison
Differences from jQuery
‱ Declarative code, not imperative (explicitly
stating, say with functions, what action needs
to be performed)
‱ Automatic data binding
‱ No direct DOM manipulation
Ex 04: More expressions
Expressions
‱ Expressions can be embedded anywhere
‱ 
 even for class values
‱ There are special filters that you can use
(currency)
‱ Values are automatically bound
MVC
Ex 05: Scope and Controller
Learnings
‱ Controller objects can separate data and
functionality
– There can be many controllers

‱ ‘$scope’ is injected by AngularJS
‱ $scope.data in the controller is referred to as
simply data in html
‱ Dot notation for object members works
(person.age)
– In fact, this is suggested practice
Scope, Controller, View
How AngularJS does MVC
Dependency Injection
Dependency Injection
Ex 07: Method on Scope
Ex 08: ngClick
Ex 09: ngRepeat
Ex 09: ngRepeat
Ex 10: Filters
Other inbuilt filters
Modules in AngularJS
‱ Third party code can be packaged as reusable
modules.
‱ The modules can be loaded in any/parallel
order (due to delayed nature of module
execution).
‱ Some Angular modules are in separate files:
Eg. ngRoute is in angularjs-route.min.js
Ex 11: ngView and Routing
ngView and Routing
‱ This part requires a web server
– I’ve created a simple one at
https://github.com/sathishvj/gowebserver
– Run suitable executable in index.html directory

‱ You can load different views contained in
partial html files based on address bar
location and apply specific controllers to it
Ex 12: $http
$http
‱ Make AJAX calls with $http
‱ It returns deferred promises
– More in later workshops

‱ You can handle ‘success’ and ‘error’
Working with angular-seed
‱ https://github.com/angular/angular-seed
‱ You need to have node.js installed to test
Ex 13: Custom Filter
Ex 14: Custom Directive
‱ -customdirective
What we didn’t cover
‱
‱
‱
‱
‱

Unit testing, E2E testing
Custom directives beyond basics
$apply and digest cycles
$q and promises
Service, Factory, Provider
Resources
‱
‱
‱
‱
‱
‱

angularjs.org
Google Groups: AngularJS
Google+: AngularJS
ngmodules.org
Github: angular-ui.github.io
Google+: AngularJS India
Project
‱ Build an app to list tweets given a search string
(might require sign-up to Twitter API)

‱ Two pages required – main and an about page
thank you
sathishvj

questions?
AngularJS Beginners Workshop
AngularJS Beginners Workshop

More Related Content

PPTX
AngularJS intro
dizabl
 
PPTX
Angularjs Basics
Anuradha Bandara
 
PDF
Introduction to AngularJS
Jussi Pohjolainen
 
PPTX
Angular JS - Introduction
Sagar Acharya
 
PPTX
Introduction to Angularjs
Manish Shekhawat
 
PPTX
Angular js architecture (v1.4.8)
Gabi Costel Lapusneanu
 
PPTX
The AngularJS way
Boyan Mihaylov
 
PPTX
Practical AngularJS
Wei Ru
 
AngularJS intro
dizabl
 
Angularjs Basics
Anuradha Bandara
 
Introduction to AngularJS
Jussi Pohjolainen
 
Angular JS - Introduction
Sagar Acharya
 
Introduction to Angularjs
Manish Shekhawat
 
Angular js architecture (v1.4.8)
Gabi Costel Lapusneanu
 
The AngularJS way
Boyan Mihaylov
 
Practical AngularJS
Wei Ru
 

What's hot (20)

PPTX
AngularJS Best Practices
Narek Mamikonyan
 
PPTX
Angular js for beginners
Munir Hoque
 
PDF
AngularJS - What is it & Why is it awesome ? (with demos)
Gary Arora
 
PDF
Introduction of angular js
Tamer Solieman
 
PPTX
Step by Step - AngularJS
Infragistics
 
PDF
AngularJS best-practices
Henry Tao
 
PPTX
Introduction to Angular JS
Santhosh Kumar Srinivasan
 
PPTX
Angular js
Behind D Walls
 
PPTX
Introduction to AngularJS
David Parsons
 
PPTX
AngularJS in 60ish Minutes
Dan Wahlin
 
PPTX
Why angular js Framework
Sakthi Bro
 
PPTX
Angular js PPT
Imtiyaz Ahmad Khan
 
PPTX
AngularJs presentation
Phan Tuan
 
PDF
Advanced Tips & Tricks for using Angular JS
Simon Guest
 
PPTX
Angular js tutorial slides
samhelman
 
PPT
Dynamic Application Development by NodeJS ,AngularJS with OrientDB
Apaichon Punopas
 
PPTX
Angular js
Dinusha Nandika
 
PDF
AngularJS: an introduction
Luigi De Russis
 
PPTX
Front end development with Angular JS
Bipin
 
PPTX
AngularJS One Day Workshop
Shyam Seshadri
 
AngularJS Best Practices
Narek Mamikonyan
 
Angular js for beginners
Munir Hoque
 
AngularJS - What is it & Why is it awesome ? (with demos)
Gary Arora
 
Introduction of angular js
Tamer Solieman
 
Step by Step - AngularJS
Infragistics
 
AngularJS best-practices
Henry Tao
 
Introduction to Angular JS
Santhosh Kumar Srinivasan
 
Angular js
Behind D Walls
 
Introduction to AngularJS
David Parsons
 
AngularJS in 60ish Minutes
Dan Wahlin
 
Why angular js Framework
Sakthi Bro
 
Angular js PPT
Imtiyaz Ahmad Khan
 
AngularJs presentation
Phan Tuan
 
Advanced Tips & Tricks for using Angular JS
Simon Guest
 
Angular js tutorial slides
samhelman
 
Dynamic Application Development by NodeJS ,AngularJS with OrientDB
Apaichon Punopas
 
Angular js
Dinusha Nandika
 
AngularJS: an introduction
Luigi De Russis
 
Front end development with Angular JS
Bipin
 
AngularJS One Day Workshop
Shyam Seshadri
 
Ad

Viewers also liked (12)

PDF
FrontEnd platform based on AngularJS
Egor Miasnikov
 
PPTX
AngularJS Internal
Eyal Vardi
 
PPTX
AngularJS: Service, factory & provider
Corley S.r.l.
 
PPTX
Dependency injection
Mindfire Solutions
 
PPTX
Building Modern Web Apps with AngularJS
Raveen Perera
 
PDF
III - Better angularjs
WebF
 
PPTX
Scope demystified - AngularJS
Sumanth krishna
 
PPTX
Angular 1.5 Components
José Barbosa
 
ODP
AngularJs Crash Course
Keith Bloomfield
 
PDF
Creating GUI Component APIs in Angular and Web Components
Rachael L Moore
 
PPTX
Introduction to AngularJs
murtazahaveliwala
 
PPTX
AngularJS Architecture
Eyal Vardi
 
FrontEnd platform based on AngularJS
Egor Miasnikov
 
AngularJS Internal
Eyal Vardi
 
AngularJS: Service, factory & provider
Corley S.r.l.
 
Dependency injection
Mindfire Solutions
 
Building Modern Web Apps with AngularJS
Raveen Perera
 
III - Better angularjs
WebF
 
Scope demystified - AngularJS
Sumanth krishna
 
Angular 1.5 Components
José Barbosa
 
AngularJs Crash Course
Keith Bloomfield
 
Creating GUI Component APIs in Angular and Web Components
Rachael L Moore
 
Introduction to AngularJs
murtazahaveliwala
 
AngularJS Architecture
Eyal Vardi
 
Ad

Similar to AngularJS Beginners Workshop (20)

PPT
Angularjs for kolkata drupal meetup
Goutam Dey
 
PDF
One Weekend With AngularJS
Yashobanta Bai
 
PPTX
Angular js for Beginnners
Santosh Kumar Kar
 
PPTX
Angularjs beginners-workshop1
Jugnu Sharma
 
PPTX
Angular js slides
Amr Abd El Latief
 
PPTX
Learning AngularJS - Complete coverage of AngularJS features and concepts
Suresh Patidar
 
PDF
AngularJS Beginner Day One
Troy Miles
 
PPTX
Angular Javascript Tutorial with command
ssuser42b933
 
DOCX
Angular js getting started
Hemant Mali
 
PPTX
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
murtazahaveliwala
 
PPT
Getting started with angular js
Maurice De Beijer [MVP]
 
PDF
AngularJs
Abdhesh Kumar
 
PDF
Angularjs 131211063348-phpapp01
Arunangsu Sahu
 
PPTX
Valentine with Angular js - Introduction
Senthil Kumar
 
PPTX
Kalp Corporate Angular Js Tutorials
Kalp Corporate
 
PPTX
Understanding angular js
Aayush Shrestha
 
PDF
AngularJS By Vipin
Vipin Mundayad
 
PDF
Angular js
Knoldus Inc.
 
PDF
AngularJS in practice
Eugene Fidelin
 
PPTX
AngularJS
Srivatsan Krishnamachari
 
Angularjs for kolkata drupal meetup
Goutam Dey
 
One Weekend With AngularJS
Yashobanta Bai
 
Angular js for Beginnners
Santosh Kumar Kar
 
Angularjs beginners-workshop1
Jugnu Sharma
 
Angular js slides
Amr Abd El Latief
 
Learning AngularJS - Complete coverage of AngularJS features and concepts
Suresh Patidar
 
AngularJS Beginner Day One
Troy Miles
 
Angular Javascript Tutorial with command
ssuser42b933
 
Angular js getting started
Hemant Mali
 
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
murtazahaveliwala
 
Getting started with angular js
Maurice De Beijer [MVP]
 
AngularJs
Abdhesh Kumar
 
Angularjs 131211063348-phpapp01
Arunangsu Sahu
 
Valentine with Angular js - Introduction
Senthil Kumar
 
Kalp Corporate Angular Js Tutorials
Kalp Corporate
 
Understanding angular js
Aayush Shrestha
 
AngularJS By Vipin
Vipin Mundayad
 
Angular js
Knoldus Inc.
 
AngularJS in practice
Eugene Fidelin
 

More from Sathish VJ (9)

PDF
Why Go Lang?
Sathish VJ
 
PDF
Docker and Kubernetes 101 workshop
Sathish VJ
 
PDF
gething started - ethereum & using the geth golang client
Sathish VJ
 
PDF
Blockchain, bitcoin
Sathish VJ
 
PDF
Apps and Hacks Showreel
Sathish VJ
 
PDF
Microsoft Ventures Hackday 2014 Bangalore - Limitless App
Sathish VJ
 
PDF
Smart Ride - our winning Internet of Things hack at the weekend Apigee hackathon
Sathish VJ
 
PDF
Google AppEngine - For GBG Bangalore
Sathish VJ
 
PDF
Internet of Things GDG Bangalore 2013
Sathish VJ
 
Why Go Lang?
Sathish VJ
 
Docker and Kubernetes 101 workshop
Sathish VJ
 
gething started - ethereum & using the geth golang client
Sathish VJ
 
Blockchain, bitcoin
Sathish VJ
 
Apps and Hacks Showreel
Sathish VJ
 
Microsoft Ventures Hackday 2014 Bangalore - Limitless App
Sathish VJ
 
Smart Ride - our winning Internet of Things hack at the weekend Apigee hackathon
Sathish VJ
 
Google AppEngine - For GBG Bangalore
Sathish VJ
 
Internet of Things GDG Bangalore 2013
Sathish VJ
 

Recently uploaded (20)

PDF
Software Development Methodologies in 2025
KodekX
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PDF
Doc9.....................................
SofiaCollazos
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
Orbitly Pitch DeckA Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
PPT
Coupa-Kickoff-Meeting-Template presentai
annapureddyn
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PPTX
Comunidade Salesforce SĂŁo Paulo - Desmistificando o Omnistudio (Vlocity)
Francisco Vieira JĂșnior
 
PPTX
Coupa-Overview _Assumptions presentation
annapureddyn
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Software Development Methodologies in 2025
KodekX
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
Doc9.....................................
SofiaCollazos
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Orbitly Pitch DeckA Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
Coupa-Kickoff-Meeting-Template presentai
annapureddyn
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Comunidade Salesforce SĂŁo Paulo - Desmistificando o Omnistudio (Vlocity)
Francisco Vieira JĂșnior
 
Coupa-Overview _Assumptions presentation
annapureddyn
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 

AngularJS Beginners Workshop

  • 2. History ‱ Origins within Google, invented by Misko Hevery ‱ Open-sourced 2009 ‱ 17,000 lines in 6 months => 1,500 in 3 weeks
  • 3. Killer Features ‱ ‱ ‱ ‱ Two-way binding Declarative coding for UI Teaching HTML new tricks Separation of model & view, No DOM/View manipulation, less code ‱ Great for CRUD based single page apps ‱ Awesome adoption and great community ‱ Unit testable, E2E testable
  • 5. Ex 1: ng-app, expression binding ‱ Download https://github.com/sathishvj/AngularJSTutoria ls/archive/master.zip ‱ Extract locally ‱ Go to 01-ngApp-binding ‱ Open html in browser ‱ Examine source code
  • 6. Ex 1: ng-app, expression binding
  • 7. Ex 1: ng-app, expression binding ‱ Include angular.js or angular.min.js ‱ Add ng-app declarative where you want Angular to manage app (typically <html> or <body>) ‱ Expression binding with {{ }} ‱ ng-app can also be written as ngApp ‱ Use camel case in JavaScript code (ngApp) and use snake case in html (ng-app)
  • 8. How does it work ‱ Compile: traverse the DOM and collect all of the directives. The result is a linking function. ‱ Link: combine the directives with a scope and produce a live view.
  • 9. Ex 2: ngModel, binding variables ‱ 02-ngModel ‱ ng-model binds variable data. It can be declared on input, select, textarea, etc.
  • 11. Other in-built declarations in Angular ngApp ngBind ngBindHtml ngBindTemplate ngBlur ngChange ngChecked ngClass ngClassEven ngClassOdd ngClick ngCloak ngController ngCopy ngCsp ngCut ngDblclick ngDisabled ngFocus ngForm ngHide ngHref ngIf ngInclude ngInit ngKeydown ngKeypress ngKeyup ngList ngModel ngMousedown ngMouseenter ngMouseleave ngMousemove ngMouseover ngMouseup ngNonBindable ngOpen ngPaste ngPluralize ngReadonly ngRepeat ngSelected ngShow ngSrc ngSrcset ngStyle ngSubmit ngSwitch ngTransclude ngValue
  • 12. Ex 3: jquery comparison ‱ 03-jquerycomparison
  • 13. Differences from jQuery ‱ Declarative code, not imperative (explicitly stating, say with functions, what action needs to be performed) ‱ Automatic data binding ‱ No direct DOM manipulation
  • 14. Ex 04: More expressions
  • 15. Expressions ‱ Expressions can be embedded anywhere ‱ 
 even for class values ‱ There are special filters that you can use (currency) ‱ Values are automatically bound
  • 16. MVC
  • 17. Ex 05: Scope and Controller
  • 18. Learnings ‱ Controller objects can separate data and functionality – There can be many controllers ‱ ‘$scope’ is injected by AngularJS ‱ $scope.data in the controller is referred to as simply data in html ‱ Dot notation for object members works (person.age) – In fact, this is suggested practice
  • 23. Ex 07: Method on Scope
  • 29. Modules in AngularJS ‱ Third party code can be packaged as reusable modules. ‱ The modules can be loaded in any/parallel order (due to delayed nature of module execution). ‱ Some Angular modules are in separate files: Eg. ngRoute is in angularjs-route.min.js
  • 30. Ex 11: ngView and Routing
  • 31. ngView and Routing ‱ This part requires a web server – I’ve created a simple one at https://github.com/sathishvj/gowebserver – Run suitable executable in index.html directory ‱ You can load different views contained in partial html files based on address bar location and apply specific controllers to it
  • 33. $http ‱ Make AJAX calls with $http ‱ It returns deferred promises – More in later workshops ‱ You can handle ‘success’ and ‘error’
  • 34. Working with angular-seed ‱ https://github.com/angular/angular-seed ‱ You need to have node.js installed to test
  • 35. Ex 13: Custom Filter
  • 36. Ex 14: Custom Directive ‱ -customdirective
  • 37. What we didn’t cover ‱ ‱ ‱ ‱ ‱ Unit testing, E2E testing Custom directives beyond basics $apply and digest cycles $q and promises Service, Factory, Provider
  • 38. Resources ‱ ‱ ‱ ‱ ‱ ‱ angularjs.org Google Groups: AngularJS Google+: AngularJS ngmodules.org Github: angular-ui.github.io Google+: AngularJS India
  • 39. Project ‱ Build an app to list tweets given a search string (might require sign-up to Twitter API) ‱ Two pages required – main and an about page

Editor's Notes

  • #3: they start with an anecdote, discussing how they were working on a web application at Google. They have already written 17000 lines of code in about 6 months and it was almost finished, albeit with great frustration related to development speed and testability. This guy, MiĆĄkoHevery, tells everyone that by using a framework that he wrote in his spare time (you gotta love devs!) they could rewrite the whole application in two weeks. He was wrong, they did it in three weeks and at the end the whole thing has only 1500 lines of code and was fully testable. 90% less code, in 90% less time. And it was very testable.
  • #9: CompilerCompiler is an angular service which traverses the DOM looking for attributes. The compilation process happens into two phases.Compile: traverse the DOM and collect all of the directives. The result is a linking function.Link: combine the directives with a scope and produce a live view. Any changes in the scope model are reflected in the view, and any user interactions with the view are reflected in the scope model. Making the scope model a single source of truth.Some directives such ng-repeat clone DOM elements once for each item in collection. Having a compile and link phase improves performance since the cloned template only needs to be compiled once, and then linked once for each clone instance.
  • #22: http://slid.es/neenhouse/dependency-injection-in-angularjs
  • #23: http://slid.es/neenhouse/dependency-injection-in-angularjs