SlideShare a Scribd company logo
1 of 27
Download to read offline
Hiten Pratap Singh
http://github.com/hitenpratap
http://hprog99.wordpress.com
AngularJS from novice to
professional
Agenda
1. What is AngularJS?
2. Core features
3. It's working
4. How to start working with it?
5. Controller
6. AngularJS directives
7. Expression
8. Forms
9. Services
Agenda
10. Modules
9. Routing
10. Scope
11. Dependency Injection
12. Filters
13. Advantages and disadvantages
14. References
15. Q/A
16. Quiz
What's AngularJS?
AngularJS (commonly referred to as "Angular") is an
open-source web application framework maintained by
Google to address many of the challenges encountered
in developing single-page applications. It aims to simplify
both the development and the testing of such
applications by providing a framework for client-side
model–view–controller (MVC) – As per Wikipedia.
Core features
1.Two way data binding
2.Templates
3.Model view controller(MVC)
4.Dependency Injection
Two Way Data Binding
Templates
 In AngularJS, a template is just plain-old-HTML. The
HTML vocabulary is extended, to contain instructions
on how the model should be projected into the view.
 The HTML templates are parsed by the browser into
the DOM. The DOM then becomes the input to the
AngularJS compiler. AngularJS traverses the DOM
template for rendering instructions, which are called
directives. Collectively, the directives are responsible
for setting up the data-binding for your application
view.
Model View Controller(MVC or MVVC)
Dependency Injection
AngularJS Working
Hello World - AngularJS
AngularJS Controller
AngularJS Directives
 ng-app: Declares an element as root element
 ng-bind: Automatically changes the text of HTML element
 ng-model: Similar to ng-bind but allow two way binding
 ng-class: Allow class attribute to be dynaically loaded
 ng-controller: Specifies javascript controller class
 ng-repeat: Instantiate an element once per item from a collection
 ng-show & ng-hide: Conditionally show or hide an element
 ng-switch: Conditionally instantiate one template from a list
 ng-view: Rendering templates driven by specific controllers
 ng-if: Simple if-else attribute that we know from ever!
AngularJS Expression
Angular Form Properties $valid, $invalid, $pristine, $dirty
Angular also provides classes on the form and its inputs so that
you can style each state accordingly.
AngularJS Services
In Angular a service is a function or an object and is used to share data
and/or behavior across controllers, directives, filters, other services etc. A
service is treated as a singleton, that is there is only one instance of a
specific service available during the whole lifetime of the Angular
application. This is different from e.g. a controller of which many
instances can be created.
The easiest way is to use the Service recipe of an angular module.
var app = angular.module('app', []);
app.service('some-service', function(){…});
Other two methods/way to create service are:
1. The factory recipe
2.The provider recipe
AngularJS Module
AngularJS Routing
AngularJS Scope
AngularJS Dependency Injection
AngularJS has a built-in dependency injection subsystem that
helps the developer by making the application easier to develop,
understand, and test.
Dependency Injection (DI) allows you to ask for your
dependencies, rather than having to go look for them or make
them yourself. Think of it as a way of saying "Hey I need X', and
the DI is responsible for creating and providing it for you.
To gain access to core AngularJS services, it is simply a matter of
adding that service as a parameter; AngularJS will detect that you
need that service and provide an instance for you.
AngularJS Filters
Angular exposes a simple API for creating a filter. Just as you
would declare a controller with app.controller(‘myCtrl',
function(){});, you can create a new filter by appending
.filter(‘filterName', function(){}) to your Angular app.
AngularJS Advantages
 Super fast development
 Makes developing SPA easy
 Awesome performance
 Make apps scalable
 Data binding and DOM manipulation
AngularJS Disadvantages
 Good for I/O driven apps only(not games)
 Angular is big and complicated. With multiple ways to do
the same thing it is hard to tell which way is better for
particular task.
 The lifecycle of Angular application is complex, and to
master it you really need to read the code.
References
 AngularJS Docs(https://docs.angularjs.org/tutorial)
 AngularJS API Reference(https://docs.angularjs.org/api)
 AngularJS Code School(http://angular.codeschool.com/)
 ng-newsletter(http://www.ng-newsletter.com/books/)
Discussion Session
QUERIES ?
Hiten Pratap Singh
http://github.com/hitenpratap
http://hprog99.wordpress.com
Quiz Time
Anyone have any suggestons about what it should be? If no
then
We'll build an online contact manager just like
Google Contact.

More Related Content

What's hot

Angular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP ServicesAngular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP ServicesWebStackAcademy
 
Angular - Chapter 1 - Introduction
 Angular - Chapter 1 - Introduction Angular - Chapter 1 - Introduction
Angular - Chapter 1 - IntroductionWebStackAcademy
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSDavid Parsons
 
Angular Introduction By Surekha Gadkari
Angular Introduction By Surekha GadkariAngular Introduction By Surekha Gadkari
Angular Introduction By Surekha GadkariSurekha Gadkari
 
Angular 2.0 forms
Angular 2.0 formsAngular 2.0 forms
Angular 2.0 formsEyal Vardi
 
Angular 10 course_content
Angular 10 course_contentAngular 10 course_content
Angular 10 course_contentNAVEENSAGGAM1
 
Angular - Chapter 4 - Data and Event Handling
 Angular - Chapter 4 - Data and Event Handling Angular - Chapter 4 - Data and Event Handling
Angular - Chapter 4 - Data and Event HandlingWebStackAcademy
 
What is component in reactjs
What is component in reactjsWhat is component in reactjs
What is component in reactjsmanojbkalla
 
ASP.NET MVC.
ASP.NET MVC.ASP.NET MVC.
ASP.NET MVC.Ni
 
[Final] ReactJS presentation
[Final] ReactJS presentation[Final] ReactJS presentation
[Final] ReactJS presentation洪 鹏发
 
ES6 presentation
ES6 presentationES6 presentation
ES6 presentationritika1
 
Building blocks of Angular
Building blocks of AngularBuilding blocks of Angular
Building blocks of AngularKnoldus Inc.
 
Angular interview questions
Angular interview questionsAngular interview questions
Angular interview questionsGoa App
 
Angular - Chapter 2 - TypeScript Programming
Angular - Chapter 2 - TypeScript Programming  Angular - Chapter 2 - TypeScript Programming
Angular - Chapter 2 - TypeScript Programming WebStackAcademy
 
Modules in AngularJs
Modules in AngularJsModules in AngularJs
Modules in AngularJsK Arunkumar
 

What's hot (20)

Angular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP ServicesAngular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP Services
 
Angular - Chapter 1 - Introduction
 Angular - Chapter 1 - Introduction Angular - Chapter 1 - Introduction
Angular - Chapter 1 - Introduction
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Angular Data Binding
Angular Data BindingAngular Data Binding
Angular Data Binding
 
Angular Introduction By Surekha Gadkari
Angular Introduction By Surekha GadkariAngular Introduction By Surekha Gadkari
Angular Introduction By Surekha Gadkari
 
Angular 9
Angular 9 Angular 9
Angular 9
 
Angular modules in depth
Angular modules in depthAngular modules in depth
Angular modules in depth
 
AngularJS
AngularJSAngularJS
AngularJS
 
Angular 2.0 forms
Angular 2.0 formsAngular 2.0 forms
Angular 2.0 forms
 
Angular 10 course_content
Angular 10 course_contentAngular 10 course_content
Angular 10 course_content
 
Angular - Chapter 4 - Data and Event Handling
 Angular - Chapter 4 - Data and Event Handling Angular - Chapter 4 - Data and Event Handling
Angular - Chapter 4 - Data and Event Handling
 
What is component in reactjs
What is component in reactjsWhat is component in reactjs
What is component in reactjs
 
ASP.NET MVC.
ASP.NET MVC.ASP.NET MVC.
ASP.NET MVC.
 
[Final] ReactJS presentation
[Final] ReactJS presentation[Final] ReactJS presentation
[Final] ReactJS presentation
 
ES6 presentation
ES6 presentationES6 presentation
ES6 presentation
 
Javascript 101
Javascript 101Javascript 101
Javascript 101
 
Building blocks of Angular
Building blocks of AngularBuilding blocks of Angular
Building blocks of Angular
 
Angular interview questions
Angular interview questionsAngular interview questions
Angular interview questions
 
Angular - Chapter 2 - TypeScript Programming
Angular - Chapter 2 - TypeScript Programming  Angular - Chapter 2 - TypeScript Programming
Angular - Chapter 2 - TypeScript Programming
 
Modules in AngularJs
Modules in AngularJsModules in AngularJs
Modules in AngularJs
 

Similar to AngularJS

Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to AngularjsGaurav Agrawal
 
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptxangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptxsarah david
 
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptxangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptxsarah david
 
AngularJs (1.x) Presentation
AngularJs (1.x) PresentationAngularJs (1.x) Presentation
AngularJs (1.x) PresentationRaghubir Singh
 
angularjs-vs-angular-the-key-differences-between-javascript-and-typescript
angularjs-vs-angular-the-key-differences-between-javascript-and-typescriptangularjs-vs-angular-the-key-differences-between-javascript-and-typescript
angularjs-vs-angular-the-key-differences-between-javascript-and-typescriptCuneiform Consulting Pvt Ltd.
 
One Weekend With AngularJS
One Weekend With AngularJSOne Weekend With AngularJS
One Weekend With AngularJSYashobanta Bai
 
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptxangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptxsarah david
 
Kalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js TutorialsKalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js TutorialsKalp Corporate
 
Angular Project Report
 Angular Project Report Angular Project Report
Angular Project ReportKodexhub
 
Angularjs overview
Angularjs  overviewAngularjs  overview
Angularjs overviewVickyCmd
 
Angular js getting started
Angular js getting startedAngular js getting started
Angular js getting startedHemant Mali
 
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdfangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdfsarah david
 
What are the key distinctions between Angular and AngularJS?
What are the key distinctions between Angular and AngularJS?What are the key distinctions between Angular and AngularJS?
What are the key distinctions between Angular and AngularJS?Albiorix Technology
 
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdfangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdfsarah david
 

Similar to AngularJS (20)

Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to Angularjs
 
AngularJS in practice
AngularJS in practiceAngularJS in practice
AngularJS in practice
 
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptxangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
 
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptxangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
 
Angular js slides
Angular js slidesAngular js slides
Angular js slides
 
AngularJs (1.x) Presentation
AngularJs (1.x) PresentationAngularJs (1.x) Presentation
AngularJs (1.x) Presentation
 
angularjs-vs-angular-the-key-differences-between-javascript-and-typescript
angularjs-vs-angular-the-key-differences-between-javascript-and-typescriptangularjs-vs-angular-the-key-differences-between-javascript-and-typescript
angularjs-vs-angular-the-key-differences-between-javascript-and-typescript
 
One Weekend With AngularJS
One Weekend With AngularJSOne Weekend With AngularJS
One Weekend With AngularJS
 
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptxangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
 
Kalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js TutorialsKalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js Tutorials
 
Angular Project Report
 Angular Project Report Angular Project Report
Angular Project Report
 
Angularjs overview
Angularjs  overviewAngularjs  overview
Angularjs overview
 
Angular js getting started
Angular js getting startedAngular js getting started
Angular js getting started
 
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdfangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
 
What are the key distinctions between Angular and AngularJS?
What are the key distinctions between Angular and AngularJS?What are the key distinctions between Angular and AngularJS?
What are the key distinctions between Angular and AngularJS?
 
Training On Angular Js
Training On Angular JsTraining On Angular Js
Training On Angular Js
 
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdfangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
 
Angular
AngularAngular
Angular
 
angular
angularangular
angular
 
angular content
angular contentangular content
angular content
 

More from NexThoughts Technologies (20)

Alexa skill
Alexa skillAlexa skill
Alexa skill
 
GraalVM
GraalVMGraalVM
GraalVM
 
Docker & kubernetes
Docker & kubernetesDocker & kubernetes
Docker & kubernetes
 
Apache commons
Apache commonsApache commons
Apache commons
 
HazelCast
HazelCastHazelCast
HazelCast
 
MySQL Pro
MySQL ProMySQL Pro
MySQL Pro
 
Microservice Architecture using Spring Boot with React & Redux
Microservice Architecture using Spring Boot with React & ReduxMicroservice Architecture using Spring Boot with React & Redux
Microservice Architecture using Spring Boot with React & Redux
 
Swagger
SwaggerSwagger
Swagger
 
Solid Principles
Solid PrinciplesSolid Principles
Solid Principles
 
Arango DB
Arango DBArango DB
Arango DB
 
Jython
JythonJython
Jython
 
Introduction to TypeScript
Introduction to TypeScriptIntroduction to TypeScript
Introduction to TypeScript
 
Smart Contract samples
Smart Contract samplesSmart Contract samples
Smart Contract samples
 
My Doc of geth
My Doc of gethMy Doc of geth
My Doc of geth
 
Geth important commands
Geth important commandsGeth important commands
Geth important commands
 
Ethereum genesis
Ethereum genesisEthereum genesis
Ethereum genesis
 
Ethereum
EthereumEthereum
Ethereum
 
Springboot Microservices
Springboot MicroservicesSpringboot Microservices
Springboot Microservices
 
An Introduction to Redux
An Introduction to ReduxAn Introduction to Redux
An Introduction to Redux
 
Google authentication
Google authenticationGoogle authentication
Google authentication
 

Recently uploaded

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Recently uploaded (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

AngularJS

  • 2. AngularJS from novice to professional
  • 3. Agenda 1. What is AngularJS? 2. Core features 3. It's working 4. How to start working with it? 5. Controller 6. AngularJS directives 7. Expression 8. Forms 9. Services
  • 4. Agenda 10. Modules 9. Routing 10. Scope 11. Dependency Injection 12. Filters 13. Advantages and disadvantages 14. References 15. Q/A 16. Quiz
  • 5. What's AngularJS? AngularJS (commonly referred to as "Angular") is an open-source web application framework maintained by Google to address many of the challenges encountered in developing single-page applications. It aims to simplify both the development and the testing of such applications by providing a framework for client-side model–view–controller (MVC) – As per Wikipedia.
  • 6. Core features 1.Two way data binding 2.Templates 3.Model view controller(MVC) 4.Dependency Injection
  • 7. Two Way Data Binding
  • 8. Templates  In AngularJS, a template is just plain-old-HTML. The HTML vocabulary is extended, to contain instructions on how the model should be projected into the view.  The HTML templates are parsed by the browser into the DOM. The DOM then becomes the input to the AngularJS compiler. AngularJS traverses the DOM template for rendering instructions, which are called directives. Collectively, the directives are responsible for setting up the data-binding for your application view.
  • 12. Hello World - AngularJS
  • 14. AngularJS Directives  ng-app: Declares an element as root element  ng-bind: Automatically changes the text of HTML element  ng-model: Similar to ng-bind but allow two way binding  ng-class: Allow class attribute to be dynaically loaded  ng-controller: Specifies javascript controller class  ng-repeat: Instantiate an element once per item from a collection  ng-show & ng-hide: Conditionally show or hide an element  ng-switch: Conditionally instantiate one template from a list  ng-view: Rendering templates driven by specific controllers  ng-if: Simple if-else attribute that we know from ever!
  • 16. Angular Form Properties $valid, $invalid, $pristine, $dirty Angular also provides classes on the form and its inputs so that you can style each state accordingly.
  • 17. AngularJS Services In Angular a service is a function or an object and is used to share data and/or behavior across controllers, directives, filters, other services etc. A service is treated as a singleton, that is there is only one instance of a specific service available during the whole lifetime of the Angular application. This is different from e.g. a controller of which many instances can be created. The easiest way is to use the Service recipe of an angular module. var app = angular.module('app', []); app.service('some-service', function(){…}); Other two methods/way to create service are: 1. The factory recipe 2.The provider recipe
  • 21. AngularJS Dependency Injection AngularJS has a built-in dependency injection subsystem that helps the developer by making the application easier to develop, understand, and test. Dependency Injection (DI) allows you to ask for your dependencies, rather than having to go look for them or make them yourself. Think of it as a way of saying "Hey I need X', and the DI is responsible for creating and providing it for you. To gain access to core AngularJS services, it is simply a matter of adding that service as a parameter; AngularJS will detect that you need that service and provide an instance for you.
  • 22. AngularJS Filters Angular exposes a simple API for creating a filter. Just as you would declare a controller with app.controller(‘myCtrl', function(){});, you can create a new filter by appending .filter(‘filterName', function(){}) to your Angular app.
  • 23. AngularJS Advantages  Super fast development  Makes developing SPA easy  Awesome performance  Make apps scalable  Data binding and DOM manipulation
  • 24. AngularJS Disadvantages  Good for I/O driven apps only(not games)  Angular is big and complicated. With multiple ways to do the same thing it is hard to tell which way is better for particular task.  The lifecycle of Angular application is complex, and to master it you really need to read the code.
  • 25. References  AngularJS Docs(https://docs.angularjs.org/tutorial)  AngularJS API Reference(https://docs.angularjs.org/api)  AngularJS Code School(http://angular.codeschool.com/)  ng-newsletter(http://www.ng-newsletter.com/books/)
  • 26. Discussion Session QUERIES ? Hiten Pratap Singh http://github.com/hitenpratap http://hprog99.wordpress.com
  • 27. Quiz Time Anyone have any suggestons about what it should be? If no then We'll build an online contact manager just like Google Contact.