SlideShare a Scribd company logo
UNDERSTANDING
KTMJS DEVELOPERS MEETUP
EPISODE 2
AYUSH SHRESTHA
Chief of Design – nLocate
Co-Founder – lishn.com
Understanding angular js
What is Angular JS?
Angular JS is an open-source JavaScript Framework
maintained by Google for building Single Page Applications
(SPAs). Its goal is to augment browser-based application with
Model-View-Controller (MVC) capability.
Understanding angular js
Understanding angular js
Understanding angular js
What is Angular JS?
 Client-side JS Framework for SPA
 Not just a single piece of a puzzle but full client side solution
 Model-View-Controller framework
 For front-end of your application
 Steroids for your UI
Core Features of
Angular JS
DISCLAIMER : THERE WILL BE CODE SNIPPETS IN THE SLIDES WHICH ARE
ONLY FOR DEMO PURPOSE AND MIGHT NOT BE TOTALLY ACCURATE
SYNTACTICALLY. IT IS ONLY MEANT TO GIVE A BRIEF OVERVIEW OF HOW
THINGS WORK.
Two-way Data Binding
ONE WAY DATA BINDING TWO WAY DATA BINDING
VIEW
TEMPLATE Model
One-
time
Merge
TEMPLATE
VIEW
Model
CONTINUOUS UPDATE
Change in view
Updates model
Change in model
Updates view
MVC Framework
 The whole application has 3 major components Model, View
and Controller
 Model is the data layer
 View is the UI layer
 Controller is the logic layer
 Actually, MVVM (Model-View-ViewModel) architecture
Templates
Static
Template
Dynamic
Data
Final
View
Templates
 Templates are plain old HTML
 Extended HTML Vocabulary to contain instructions on how
to combine model data into view
 Its NOT HTML string manipulation (one of the major
differences from other frameworks)
Templates
ng-src
Dependency Injection
 Built-in Dependency Injection Subsystem
 Easier to understand and test
 Modular Development
 Just ask for things that you want to use (built-in or custom
services)
Dependency Injection
Directives
 Extend HTML vocabulary to give
them superpowers
 In-built and custom directives
Core Concepts of
Angular JS
Modules
 Container for different parts of your application –
controllers, services, filters, etc.
 Declaratively specify how an application is to be
bootstrapped
 Builds reusable component packages
 Can be loaded in any order (or even in parallel)
Modules
Modules
Modules
Modules
Modules
 A module for each feature
 A module for reusable features
 An application level module which will depend on above
modules and will be auto-bootstrapped.
Controllers
 Logic behind the view
 Constructs the Model and publishes it to the View
 Instantiate the ViewModel object or “$scope”
 Set up the initial state of the $scope
 Add behavior to $scope
Controllers
Writing Controllers
Writing Controllers
Writing Controllers
View
 What the users see
 HTML Template that is merged with the model and finally
rendered into the browser DOM
Model
 Data that is merged with the HTML template to produce
views
Model
 Data that is merged with the HTML template to produce
views
Scope
 An object that refers to the application’s data-model
 $scope
 Execution context for expression
 Contains data, behaviors and other APIs to manage model
mutation and events.
Scope : Scope Hierarchy
Scope : Scope Hierarchy
Hello World
Hello John Doe
Hello Ramesh
Hello Suresh
Scope : $watch
 API to observe model mutation
Scope : $digest cycle
 A cycle that processes all watcher functions
 Asynchronous Dirty Checking cycle
 Not to be called directly, instead we use $apply
Scope : $apply
 Explicitly evaluate expressions in angular from outside
angular
 Executes $digest after expression evaluation
Scope : Events
 $emit(‘somethingHappened’, args) – dispatches event
upwards the scope
 $broadcast(‘somethingHappened’, args) – dispatches event
downwards the scope
 $on(‘somethingHappened’, listenerFunction) – listens to
event fires and executes listener function.
Filters
 Formats the value of an expression for display
 Change form of data
 Return a subset of list according to some rule
Filters
Filters : Custom
Filters : Custom
Services
 Injectable objects that can be used to organize and share
code and functions across the application
 Could be used to share utility functions
 Angular provides useful services like $http to make AJAX
requests
 We can also make custom services
Services
Directives
 Coolest feature of angular js
 Markers on DOM elements (attributes, element names,
class names, comment) that attach specified behaviors to
that DOM element, or even transform the element
 Superpowers for your DOM
Directives : In-built directives
 Ng-app
 Ng-bind
 Ng-model
 Ng-class
 Ng-controller
 Ng-show /Ng-Hide
 Ng-if
 Ng-switch
Directives : Custom Directives
Directives : Custom Directives
Directives : Custom Directives
That’s All For Today!!
 Routing using angular-ui-router
 Scope Life Cycle
 $resource
 Services/Factories/Providers
 Ng-include and $templateCache
 Custom Directives
One more thing…
AYUSH SHRESTHA
fb.me/ShresthaAayush
@AayushShrestha
+AayushShresthaOriginal
aayush@nLocate.com
aayushonweb@gmail.com

More Related Content

PPTX
Spring Framework Petclinic sample application
Antoine Rey
 
PPTX
AngularJs presentation
Phan Tuan
 
PPTX
Domain Driven Design
Ryan Riley
 
PPTX
AWS API Gateway
Muhammed YALÇIN
 
PDF
Terraform을 이용한 Infrastructure as Code 실전 구성하기 :: 변정훈::AWS Summit Seoul 2018
Amazon Web Services Korea
 
PDF
Introduction to kotlin
NAVER Engineering
 
PDF
Svelte JS introduction
Mikhail Kuznetcov
 
PPTX
02 api gateway
Janani Velmurugan
 
Spring Framework Petclinic sample application
Antoine Rey
 
AngularJs presentation
Phan Tuan
 
Domain Driven Design
Ryan Riley
 
AWS API Gateway
Muhammed YALÇIN
 
Terraform을 이용한 Infrastructure as Code 실전 구성하기 :: 변정훈::AWS Summit Seoul 2018
Amazon Web Services Korea
 
Introduction to kotlin
NAVER Engineering
 
Svelte JS introduction
Mikhail Kuznetcov
 
02 api gateway
Janani Velmurugan
 

What's hot (20)

PDF
MEAN Stack
Krishnaprasad k
 
PDF
서버리스 앱 배포 자동화 (김필중, AWS 솔루션즈 아키텍트) :: AWS DevDay2018
Amazon Web Services Korea
 
PPT
Java EE Introduction
ejlp12
 
PDF
Scale Kubernetes to support 50000 services
LinuxCon ContainerCon CloudOpen China
 
PPTX
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Arjun Thakur
 
PPTX
Spring data jpa
Jeevesh Pandey
 
PDF
Data Residency: Challenges and the Need for Standards
Cloud Standards Customer Council
 
PDF
Amazon VPC와 ELB/Direct Connect/VPN 알아보기 - 김세준, AWS 솔루션즈 아키텍트
Amazon Web Services Korea
 
PDF
CI/CD 101
djdule
 
PPTX
Angular introduction students
Christian John Felix
 
PDF
Jenkins를 활용한 Openshift CI/CD 구성
rockplace
 
PDF
NEXT.JS
Binumon Joseph
 
PPTX
An Overview of Web Services: SOAP and REST
Ram Awadh Prasad, PMP
 
PPT
presentation on Docker
Virendra Ruhela
 
PDF
50 nouvelles choses que l'on peut faire avec Java 8
José Paumard
 
PDF
카카오 광고 플랫폼 MSA 적용 사례 및 API Gateway와 인증 구현에 대한 소개
if kakao
 
PPTX
Introduction to angular with a simple but complete project
Jadson Santos
 
PPTX
Couchbase 101
Dipti Borkar
 
PDF
Open source APM Scouter로 모니터링 잘 하기
GunHee Lee
 
PDF
Docker 101: Introduction to Docker
Docker, Inc.
 
MEAN Stack
Krishnaprasad k
 
서버리스 앱 배포 자동화 (김필중, AWS 솔루션즈 아키텍트) :: AWS DevDay2018
Amazon Web Services Korea
 
Java EE Introduction
ejlp12
 
Scale Kubernetes to support 50000 services
LinuxCon ContainerCon CloudOpen China
 
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Arjun Thakur
 
Spring data jpa
Jeevesh Pandey
 
Data Residency: Challenges and the Need for Standards
Cloud Standards Customer Council
 
Amazon VPC와 ELB/Direct Connect/VPN 알아보기 - 김세준, AWS 솔루션즈 아키텍트
Amazon Web Services Korea
 
CI/CD 101
djdule
 
Angular introduction students
Christian John Felix
 
Jenkins를 활용한 Openshift CI/CD 구성
rockplace
 
An Overview of Web Services: SOAP and REST
Ram Awadh Prasad, PMP
 
presentation on Docker
Virendra Ruhela
 
50 nouvelles choses que l'on peut faire avec Java 8
José Paumard
 
카카오 광고 플랫폼 MSA 적용 사례 및 API Gateway와 인증 구현에 대한 소개
if kakao
 
Introduction to angular with a simple but complete project
Jadson Santos
 
Couchbase 101
Dipti Borkar
 
Open source APM Scouter로 모니터링 잘 하기
GunHee Lee
 
Docker 101: Introduction to Docker
Docker, Inc.
 
Ad

Similar to Understanding angular js (20)

PPTX
Angular workshop - Full Development Guide
Nitin Giri
 
PDF
AngularJS: Overview & Key Features
Mohamad Al Asmar
 
PDF
AngularJS Workshop
Gianluca Cacace
 
PPT
Getting started with angular js
Maurice De Beijer [MVP]
 
PPTX
AngularJS is awesome
Eusebiu Schipor
 
PPTX
Learning AngularJS - Complete coverage of AngularJS features and concepts
Suresh Patidar
 
PPTX
Intro to AngularJs
SolTech, Inc.
 
PPT
Getting started with angular js
Maurice De Beijer [MVP]
 
PPT
Angular js
yogi_solanki
 
PPTX
Angular js
Ramakrishna kapa
 
PPTX
Angular js 1.0-fundamentals
Venkatesh Narayanan
 
PDF
Everything You Need To Know About AngularJS
Sina Mirhejazi
 
PPT
Angular js
Hritesh Saha
 
PPTX
Angularjs basic part01
Mohd Abdul Baquee
 
PPTX
Angular Presentation
Adam Moore
 
PPTX
Angular js introduction
Praveen Gubbala
 
PPTX
Single Page Applications Workshop Part II: Single Page Applications using Ang...
Jalal Mostafa
 
PDF
One Weekend With AngularJS
Yashobanta Bai
 
Angular workshop - Full Development Guide
Nitin Giri
 
AngularJS: Overview & Key Features
Mohamad Al Asmar
 
AngularJS Workshop
Gianluca Cacace
 
Getting started with angular js
Maurice De Beijer [MVP]
 
AngularJS is awesome
Eusebiu Schipor
 
Learning AngularJS - Complete coverage of AngularJS features and concepts
Suresh Patidar
 
Intro to AngularJs
SolTech, Inc.
 
Getting started with angular js
Maurice De Beijer [MVP]
 
Angular js
yogi_solanki
 
Angular js
Ramakrishna kapa
 
Angular js 1.0-fundamentals
Venkatesh Narayanan
 
Everything You Need To Know About AngularJS
Sina Mirhejazi
 
Angular js
Hritesh Saha
 
Angularjs basic part01
Mohd Abdul Baquee
 
Angular Presentation
Adam Moore
 
Angular js introduction
Praveen Gubbala
 
Single Page Applications Workshop Part II: Single Page Applications using Ang...
Jalal Mostafa
 
One Weekend With AngularJS
Yashobanta Bai
 
Ad

More from Aayush Shrestha (9)

PPTX
Design and UX. An Introduction
Aayush Shrestha
 
PDF
Open Graph API And How To Use It : Facebook Developers Circle Meetup 2017
Aayush Shrestha
 
PPTX
Workshop on Hybrid App Development with Ionic Framework
Aayush Shrestha
 
PPTX
Power of Elastic Search - nLocate
Aayush Shrestha
 
PPTX
JavaScript : What is it really? AND Some new features in ES6
Aayush Shrestha
 
PDF
Facebook Open Graph API and How To Use It
Aayush Shrestha
 
PPTX
A Half Day Workshop on Building Accessible Websites For People With Disabilities
Aayush Shrestha
 
PPTX
XBRL Implementation for Financial Reporting | NCASA
Aayush Shrestha
 
PPTX
XBRL Implementation for Financial Reporting
Aayush Shrestha
 
Design and UX. An Introduction
Aayush Shrestha
 
Open Graph API And How To Use It : Facebook Developers Circle Meetup 2017
Aayush Shrestha
 
Workshop on Hybrid App Development with Ionic Framework
Aayush Shrestha
 
Power of Elastic Search - nLocate
Aayush Shrestha
 
JavaScript : What is it really? AND Some new features in ES6
Aayush Shrestha
 
Facebook Open Graph API and How To Use It
Aayush Shrestha
 
A Half Day Workshop on Building Accessible Websites For People With Disabilities
Aayush Shrestha
 
XBRL Implementation for Financial Reporting | NCASA
Aayush Shrestha
 
XBRL Implementation for Financial Reporting
Aayush Shrestha
 

Recently uploaded (20)

PPTX
Digital Marketing training in Chandigarh
chetann0777
 
PPTX
PPT Lapkas helminthiasiiiiiiiiiiiiis.pptx
ratnaernawati4
 
PDF
PowerPoint Presentation -- Larry G -- 2021 -- 218df4ebe0bc5607d6bfcf49fd21eda...
Adeel452922
 
PDF
Invincible Season 2 Storyboard Revisions by Mark G
MarkGalez
 
PPTX
How To Write A ResumeCV - Resume Writing Tips
yeasinArafath6
 
PDF
【2nd】Explanatory material of DTU(230207).pdf
kewalsinghpuriya
 
PPTX
Induction_Orientation_PPT.pptx for new joiners
baliyannisha12345
 
PPT
Gas turbine mark VIe control Monitoring IO.ppt
aliyu4ahmad
 
PPTX
AMB Trainingt for School Teachers.pptx h
vidushirathiji
 
PPTX
FIND ODD SHAPE OUT for placement activity.pptx
YESIMSMART
 
PPTX
Capstone Professional Portfolio Melissa Alice
malice926
 
PDF
Left Holding the Bag sequence 1 storyboard by Mark G.
MarkGalez
 
PPTX
锡根大学文凭办理|办理Uni Siegen毕业证电子版成绩单在线办理办成绩单
xxxihn4u
 
PPTX
jinsha and arif-2.pptx blood factors and diseases
arifkhansm29
 
PDF
Left Holding the Bag sequence 2 Storyboard by Mark G
MarkGalez
 
PDF
reStartEvents 8:7 Nationwide All-Clearances Employer Directory.pdf
Ken Fuller
 
PDF
Copy of HKISO FINAL ROUND Session 1 & 2 - S3 and SS.pdf
nothisispatrickduhh
 
PPTX
tech vs soft skill .pptxhgdvnhygnuufcbnbg
spnr2427
 
PDF
LeadIAS – Best IAS Coaching in Kerala.pdf
LeadIAS
 
PDF
Meatball of Canyon Valley sequence 2 storyboard by Mark G.
MarkGalez
 
Digital Marketing training in Chandigarh
chetann0777
 
PPT Lapkas helminthiasiiiiiiiiiiiiis.pptx
ratnaernawati4
 
PowerPoint Presentation -- Larry G -- 2021 -- 218df4ebe0bc5607d6bfcf49fd21eda...
Adeel452922
 
Invincible Season 2 Storyboard Revisions by Mark G
MarkGalez
 
How To Write A ResumeCV - Resume Writing Tips
yeasinArafath6
 
【2nd】Explanatory material of DTU(230207).pdf
kewalsinghpuriya
 
Induction_Orientation_PPT.pptx for new joiners
baliyannisha12345
 
Gas turbine mark VIe control Monitoring IO.ppt
aliyu4ahmad
 
AMB Trainingt for School Teachers.pptx h
vidushirathiji
 
FIND ODD SHAPE OUT for placement activity.pptx
YESIMSMART
 
Capstone Professional Portfolio Melissa Alice
malice926
 
Left Holding the Bag sequence 1 storyboard by Mark G.
MarkGalez
 
锡根大学文凭办理|办理Uni Siegen毕业证电子版成绩单在线办理办成绩单
xxxihn4u
 
jinsha and arif-2.pptx blood factors and diseases
arifkhansm29
 
Left Holding the Bag sequence 2 Storyboard by Mark G
MarkGalez
 
reStartEvents 8:7 Nationwide All-Clearances Employer Directory.pdf
Ken Fuller
 
Copy of HKISO FINAL ROUND Session 1 & 2 - S3 and SS.pdf
nothisispatrickduhh
 
tech vs soft skill .pptxhgdvnhygnuufcbnbg
spnr2427
 
LeadIAS – Best IAS Coaching in Kerala.pdf
LeadIAS
 
Meatball of Canyon Valley sequence 2 storyboard by Mark G.
MarkGalez
 

Understanding angular js

Editor's Notes

  • #4: It all started because we wanted a better User Experience. We wanted dynamic things without having to refresh the page. Angular JS is a product of that want.