SlideShare ist ein Scribd-Unternehmen logo
1 von 32
www.edureka.co/angular-js
Agenda
❖ Evolution of Web Development
❖ What is AngularJS ?
❖ Angular 2 and It’s Architecture
❖ Components of Angular 2
❖ Your First Angular 2 program
www.edureka.co/angular-js
Challenges of Web Development
www.edureka.co/angular-js
Evolution of Web Development
• Client-side scripting is executed on the client’s browser instead of the web-server
• It alleviates some of the burden on your web server when running a web application.
• It can be used for page navigation, data validation and formatting.
>Client-side
processing
Less Server
overhead
Request>
Response
www.edureka.co/angular-js
Evolution of Web Development
• JQuery is a specific library of JavaScript code.
• It is a DOM manipulation library that makes it easier to use JavaScript on your website.
• jQuery wraps the complex code into simple methods whether it required to make AJAX calls or manipulate the DOM.
>
www.edureka.co/angular-js
Evolution of Web Development
• JQuery has no real structure, the developer has full freedom to build projects as they see fit.
• But the lack of structure can lead to confusion on larger projects with no clear design direction or code maintainability.
For these situations, a framework like AngularJS can be a big help.
www.edureka.co/angular-js
What is AngularJS ?
www.edureka.co/angular-js
AngularJS Introduction
• AngularJS was developed in 2009 by Misko Hevery and Adam Abrons
at Brat Tech LLC.
• It is a open source JavaScript client-side framework maintained by
Google and a group of developers and enterprises
www.edureka.co/angular-js
What is AngularJS?
• Client side JavaScript framework to develop a dynamic web application
• Help developers build SPAs in accordance with best practices for web development
• Data binding and dependency injection eliminate much of the code you would otherwise have to write
• Extends HTML attributes with Directives, and binds data to HTML with Expressions
www.edureka.co/angular-js
AngularJS - Manipulating DOM
• Traditionally, the view modifies the DOM to present data and manipulates the DOM (or invokes jQuery) to add behaviour
• AngularJS puts all the DOM manipulation code into directives, thus easily separating that code out from the view and making it
available as standalone reusable units
View DOM
manipulation
View DOM
manipulation
Directives
www.edureka.co/angular-js
Single Page Application
www.edureka.co/angular-js
Single Page Application
A Single Page Application is a web application that requires only a single page load in a web browser.
• Your browser fully renders the DOM a single time.
• After this, background JavaScript performs any server
interactions and modifies the view as needed.
Navigation Bar
CoursesSide Bar
{ }
{ } { }
www.edureka.co/angular-js
Angular 2.0
www.edureka.co/angular-js
Angular 2
Mobile development
Desktop development is much easier when mobile
performance issues are handled first
Modularity
Much core functionality has moved to modules,
producing a lighter, faster core
www.edureka.co/angular-js
Angular 2
Using TypeScript
Class-based Object Oriented Programming, Static
Typing, Generics, Lambdas
ECMAScript 6
Iterators, For/Of loops, Python-style
generators, Reflection
www.edureka.co/angular-js
Architecture Angular 2.0
www.edureka.co/angular-js
Architecture
Template
< >
Injectors
Directives
{ }
Components
{ }
Module
Components
{ }
Module
Service
{ }
Module
Fn
ƛ
Module
Value
3.14
Services
{ }
Property
Binding
Event
Binding
Metadata
Metadata
www.edureka.co/angular-js
Main Building Blocks Of Angular 2
Components
Modules
Templates
Metadata
Services
Data Binding
Directives
Dependency Injection
www.edureka.co/angular-js
Building Blocks - Components
Templates
Metadata
Services
Data binding
Components1
3
4
5
6
Directives7
Modules2
Dependency
Injection
8
• Encapsulates the template, data and the behaviour of a view
{ }
{ } { }
{ } { } { }
Root Component
www.edureka.co/angular-js
Building Blocks - Components
Templates
Metadata
Services
Data binding
Components1
3
4
5
6
Directives7
Modules2
Dependency
Injection
8
www.edureka.co/angular-js
Building Blocks - Components
Templates
Metadata
Services
Data binding
Components1
3
4
5
6
Directives7
Modules2
Dependency
Injection
8
Navigation Bar
Side Bar
{ }
{ }
Course1
Course3
Course4
Course2
{ }
{ }
{ }
{ }
www.edureka.co/angular-js
Building Blocks - Components
Templates
Metadata
Services
Data binding
Components1
3
4
5
6
Directives7
Modules2
Dependency
Injection
8
Edureka
Nav bar
Course
Side BarCourses
www.edureka.co/angular-js
Building Blocks - Modules
Templates
Metadata
Services
Data binding
Components1
3
4
5
6
Directives7
Modules2
Dependency
Injection
8
• A cohesive block of code dedicated to an application domain, a workflow, or a
closely related set of capabilities
• Every Angular app has at least one Angular module class, the root module
(AppModule)
• An Angular module, whether a root or feature, is a class with
an @NgModule decorator
Module:
Templates
< >
Directives
{ }
Components
{ }
Services
{ }
www.edureka.co/angular-js
Building Blocks - Templates
Templates
Metadata
Services
Data binding
Components1
3
4
5
6
Directives7
Modules2
Dependency
Injection
8
Root
Component
{ }
Root
Template
< >
Child B
Component
{ }
Child B
Template
< >
Child A
Component
{ }
Child A
Template
< >
• You define a component's view with its companion template
• A template is a form of HTML that tells Angular how to render the component
• Although this template uses typical HTML elements but it also uses Angular's template syntax
www.edureka.co/angular-js
Building Blocks - Metadata
Templates
Metadata
Services
Data binding
Components1
3
4
5
6
Directives7
Modules2
Dependency
Injection
8
• Metadata tells Angular how to process a class
• In TypeScript, you attach metadata by using a decorator
• The template, metadata, and component together describe a view
Components
{ }
Template
< >
Metadata
www.edureka.co/angular-js
Building Blocks - Services
Templates
Metadata
Services
Data binding
Components1
3
4
5
6
Directives7
Modules2
Dependency
Injection
8
• Service is a plain class that encapsulates any non logic not related to view
• Examples include - logging service, data service, tax calculator etc.
• Service accomplishes tasks that fetch data from the server, validate user input, or log directly
to the console
{ }
Data Access
Logging
Business Logic
Configuration
COMPONENTS SERVICES {
www.edureka.co/angular-js
Building Blocks – Data Binding
Templates
Metadata
Services
Data binding
Components1
3
4
5
6
Directives7
Modules2
Dependency
Injection
8
• Responsible for pushing data values into the HTML controls
and turning user responses into actions and value updates
• The three forms of binding:
• Interpolation
• Property binding
• Event binding
NOTE :
• In two-way binding, a data property value flows to the view from the
component as with property binding
• The user's changes also flow back to the component, resetting the property to
the latest value, as with event binding
Components
{ }
Template
< >
Property
Binding
Event
BindingMetadata
www.edureka.co/angular-js
Building Blocks – Directives
Templates
Metadata
Services
Data binding
Components1
3
4
5
6
Directives7
Modules2
Dependency
Injection
8
• Modify DOM elements and modify their Behaviours
• Built-in directives helps in -
• Extend or control DOM
• Adding classes
• And much more …
• You can also write your own directives
www.edureka.co/angular-js
Building Blocks – Dependency Injection
Templates
Metadata
Services
Data binding
Components1
3
4
5
6
Directives7
Modules2
Dependency Injection8
• A way to supply a new instance of a class with the fully-formed dependencies it requires
like services
• Provide new components with the services they need
• An injector can create a new service instance from a provider
Service
Instances
Class
www.edureka.co/angular-js
Your First Angular 2 program
www.edureka.co/angular-js
Put on your Angular Glass
www.edureka.co/angular-js
Thank You …
Questions/Queries/Feedback

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

What angular 13 will bring to the table
What angular 13 will bring to the table What angular 13 will bring to the table
What angular 13 will bring to the table
 
Angular 2
Angular 2Angular 2
Angular 2
 
Introduction to angular 2
Introduction to angular 2Introduction to angular 2
Introduction to angular 2
 
Angular 6 - The Complete Guide
Angular 6 - The Complete GuideAngular 6 - The Complete Guide
Angular 6 - The Complete Guide
 
Talk for DevFest 2021 - GDG Bénin
Talk for DevFest 2021 - GDG BéninTalk for DevFest 2021 - GDG Bénin
Talk for DevFest 2021 - GDG Bénin
 
Angular 2
Angular 2Angular 2
Angular 2
 
Developing a Demo Application with Angular 4 - J2I
Developing a Demo Application with Angular 4 - J2IDeveloping a Demo Application with Angular 4 - J2I
Developing a Demo Application with Angular 4 - J2I
 
Angular 2 - Core Concepts
Angular 2 - Core ConceptsAngular 2 - Core Concepts
Angular 2 - Core Concepts
 
What is Angular version 4?
What is Angular version 4?What is Angular version 4?
What is Angular version 4?
 
Angular2 intro
Angular2 introAngular2 intro
Angular2 intro
 
An Overview of Angular 4
An Overview of Angular 4 An Overview of Angular 4
An Overview of Angular 4
 
Mastering angular - Dot Net Tricks
Mastering angular - Dot Net TricksMastering angular - Dot Net Tricks
Mastering angular - Dot Net Tricks
 
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...
 
Go live with angular 4
Go live with angular 4Go live with angular 4
Go live with angular 4
 
Angular 2 Examples | Angular CRUD Application | Angular Tutorial | Angular Tr...
Angular 2 Examples | Angular CRUD Application | Angular Tutorial | Angular Tr...Angular 2 Examples | Angular CRUD Application | Angular Tutorial | Angular Tr...
Angular 2 Examples | Angular CRUD Application | Angular Tutorial | Angular Tr...
 
Angular 4 - quick view
Angular 4 - quick viewAngular 4 - quick view
Angular 4 - quick view
 
Introduction to angular 2
Introduction to angular 2Introduction to angular 2
Introduction to angular 2
 
Angular 9
Angular 9 Angular 9
Angular 9
 
Angular 2: What's New?
Angular 2: What's New?Angular 2: What's New?
Angular 2: What's New?
 
Quick introduction to Angular 4 for AngularJS 1.5 developers
Quick introduction to Angular 4 for AngularJS 1.5 developersQuick introduction to Angular 4 for AngularJS 1.5 developers
Quick introduction to Angular 4 for AngularJS 1.5 developers
 

Ähnlich wie What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edureka

Benefits of developing single page web applications using angular js
Benefits of developing single page web applications using angular jsBenefits of developing single page web applications using angular js
Benefits of developing single page web applications using angular js
Harbinger Systems - HRTech Builder of Choice
 
JavaScript MVC Frameworks: Backbone, Ember and Angular JS
JavaScript MVC Frameworks: Backbone, Ember and Angular JSJavaScript MVC Frameworks: Backbone, Ember and Angular JS
JavaScript MVC Frameworks: Backbone, Ember and Angular JS
Harbinger Systems - HRTech Builder of Choice
 

Ähnlich wie What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edureka (20)

Angularjs basic part01
Angularjs basic part01Angularjs basic part01
Angularjs basic part01
 
AngularJS is awesome
AngularJS is awesomeAngularJS is awesome
AngularJS is awesome
 
Angular js anupama
Angular js anupamaAngular js anupama
Angular js anupama
 
Benefits of developing single page web applications using angular js
Benefits of developing single page web applications using angular jsBenefits of developing single page web applications using angular js
Benefits of developing single page web applications using angular js
 
Introduction to Angular Js
Introduction to Angular JsIntroduction to Angular Js
Introduction to Angular Js
 
Module2
Module2Module2
Module2
 
Learning AngularJS - Complete coverage of AngularJS features and concepts
Learning AngularJS  - Complete coverage of AngularJS features and conceptsLearning AngularJS  - Complete coverage of AngularJS features and concepts
Learning AngularJS - Complete coverage of AngularJS features and concepts
 
Angular patterns
Angular patternsAngular patterns
Angular patterns
 
AngularJs (1.x) Presentation
AngularJs (1.x) PresentationAngularJs (1.x) Presentation
AngularJs (1.x) Presentation
 
Comparing Angular and React JS for SPAs
Comparing Angular and React JS for SPAsComparing Angular and React JS for SPAs
Comparing Angular and React JS for SPAs
 
Introduction to-angular js
Introduction to-angular jsIntroduction to-angular js
Introduction to-angular js
 
Angular js- 1.X
Angular js- 1.XAngular js- 1.X
Angular js- 1.X
 
MVC Framework
MVC FrameworkMVC Framework
MVC Framework
 
Angular JS tutorial
Angular JS tutorialAngular JS tutorial
Angular JS tutorial
 
AngularJS
AngularJSAngularJS
AngularJS
 
JavaScript MVC Frameworks: Backbone, Ember and Angular JS
JavaScript MVC Frameworks: Backbone, Ember and Angular JSJavaScript MVC Frameworks: Backbone, Ember and Angular JS
JavaScript MVC Frameworks: Backbone, Ember and Angular JS
 
React vs Angular - Which is best JS Framework for Front-end Development
React vs Angular - Which is best JS Framework for Front-end DevelopmentReact vs Angular - Which is best JS Framework for Front-end Development
React vs Angular - Which is best JS Framework for Front-end Development
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...
 
The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...
 
Javascript frameworks
Javascript frameworksJavascript frameworks
Javascript frameworks
 

Mehr von Edureka!

Mehr von Edureka! (20)

What to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaWhat to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | Edureka
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
 
Top 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaTop 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | Edureka
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | Edureka
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | Edureka
 
Top Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | Edureka
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | Edureka
 
How to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaHow to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| Edureka
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | Edureka
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | Edureka
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | Edureka
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | Edureka
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | Edureka
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | Edureka
 
Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | Edureka
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | Edureka
 

Kürzlich hochgeladen

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edureka

  • 1.
  • 2. www.edureka.co/angular-js Agenda ❖ Evolution of Web Development ❖ What is AngularJS ? ❖ Angular 2 and It’s Architecture ❖ Components of Angular 2 ❖ Your First Angular 2 program
  • 4. www.edureka.co/angular-js Evolution of Web Development • Client-side scripting is executed on the client’s browser instead of the web-server • It alleviates some of the burden on your web server when running a web application. • It can be used for page navigation, data validation and formatting. >Client-side processing Less Server overhead Request> Response
  • 5. www.edureka.co/angular-js Evolution of Web Development • JQuery is a specific library of JavaScript code. • It is a DOM manipulation library that makes it easier to use JavaScript on your website. • jQuery wraps the complex code into simple methods whether it required to make AJAX calls or manipulate the DOM. >
  • 6. www.edureka.co/angular-js Evolution of Web Development • JQuery has no real structure, the developer has full freedom to build projects as they see fit. • But the lack of structure can lead to confusion on larger projects with no clear design direction or code maintainability. For these situations, a framework like AngularJS can be a big help.
  • 8. www.edureka.co/angular-js AngularJS Introduction • AngularJS was developed in 2009 by Misko Hevery and Adam Abrons at Brat Tech LLC. • It is a open source JavaScript client-side framework maintained by Google and a group of developers and enterprises
  • 9. www.edureka.co/angular-js What is AngularJS? • Client side JavaScript framework to develop a dynamic web application • Help developers build SPAs in accordance with best practices for web development • Data binding and dependency injection eliminate much of the code you would otherwise have to write • Extends HTML attributes with Directives, and binds data to HTML with Expressions
  • 10. www.edureka.co/angular-js AngularJS - Manipulating DOM • Traditionally, the view modifies the DOM to present data and manipulates the DOM (or invokes jQuery) to add behaviour • AngularJS puts all the DOM manipulation code into directives, thus easily separating that code out from the view and making it available as standalone reusable units View DOM manipulation View DOM manipulation Directives
  • 12. www.edureka.co/angular-js Single Page Application A Single Page Application is a web application that requires only a single page load in a web browser. • Your browser fully renders the DOM a single time. • After this, background JavaScript performs any server interactions and modifies the view as needed. Navigation Bar CoursesSide Bar { } { } { }
  • 14. www.edureka.co/angular-js Angular 2 Mobile development Desktop development is much easier when mobile performance issues are handled first Modularity Much core functionality has moved to modules, producing a lighter, faster core
  • 15. www.edureka.co/angular-js Angular 2 Using TypeScript Class-based Object Oriented Programming, Static Typing, Generics, Lambdas ECMAScript 6 Iterators, For/Of loops, Python-style generators, Reflection
  • 17. www.edureka.co/angular-js Architecture Template < > Injectors Directives { } Components { } Module Components { } Module Service { } Module Fn ƛ Module Value 3.14 Services { } Property Binding Event Binding Metadata Metadata
  • 18. www.edureka.co/angular-js Main Building Blocks Of Angular 2 Components Modules Templates Metadata Services Data Binding Directives Dependency Injection
  • 19. www.edureka.co/angular-js Building Blocks - Components Templates Metadata Services Data binding Components1 3 4 5 6 Directives7 Modules2 Dependency Injection 8 • Encapsulates the template, data and the behaviour of a view { } { } { } { } { } { } Root Component
  • 20. www.edureka.co/angular-js Building Blocks - Components Templates Metadata Services Data binding Components1 3 4 5 6 Directives7 Modules2 Dependency Injection 8
  • 21. www.edureka.co/angular-js Building Blocks - Components Templates Metadata Services Data binding Components1 3 4 5 6 Directives7 Modules2 Dependency Injection 8 Navigation Bar Side Bar { } { } Course1 Course3 Course4 Course2 { } { } { } { }
  • 22. www.edureka.co/angular-js Building Blocks - Components Templates Metadata Services Data binding Components1 3 4 5 6 Directives7 Modules2 Dependency Injection 8 Edureka Nav bar Course Side BarCourses
  • 23. www.edureka.co/angular-js Building Blocks - Modules Templates Metadata Services Data binding Components1 3 4 5 6 Directives7 Modules2 Dependency Injection 8 • A cohesive block of code dedicated to an application domain, a workflow, or a closely related set of capabilities • Every Angular app has at least one Angular module class, the root module (AppModule) • An Angular module, whether a root or feature, is a class with an @NgModule decorator Module: Templates < > Directives { } Components { } Services { }
  • 24. www.edureka.co/angular-js Building Blocks - Templates Templates Metadata Services Data binding Components1 3 4 5 6 Directives7 Modules2 Dependency Injection 8 Root Component { } Root Template < > Child B Component { } Child B Template < > Child A Component { } Child A Template < > • You define a component's view with its companion template • A template is a form of HTML that tells Angular how to render the component • Although this template uses typical HTML elements but it also uses Angular's template syntax
  • 25. www.edureka.co/angular-js Building Blocks - Metadata Templates Metadata Services Data binding Components1 3 4 5 6 Directives7 Modules2 Dependency Injection 8 • Metadata tells Angular how to process a class • In TypeScript, you attach metadata by using a decorator • The template, metadata, and component together describe a view Components { } Template < > Metadata
  • 26. www.edureka.co/angular-js Building Blocks - Services Templates Metadata Services Data binding Components1 3 4 5 6 Directives7 Modules2 Dependency Injection 8 • Service is a plain class that encapsulates any non logic not related to view • Examples include - logging service, data service, tax calculator etc. • Service accomplishes tasks that fetch data from the server, validate user input, or log directly to the console { } Data Access Logging Business Logic Configuration COMPONENTS SERVICES {
  • 27. www.edureka.co/angular-js Building Blocks – Data Binding Templates Metadata Services Data binding Components1 3 4 5 6 Directives7 Modules2 Dependency Injection 8 • Responsible for pushing data values into the HTML controls and turning user responses into actions and value updates • The three forms of binding: • Interpolation • Property binding • Event binding NOTE : • In two-way binding, a data property value flows to the view from the component as with property binding • The user's changes also flow back to the component, resetting the property to the latest value, as with event binding Components { } Template < > Property Binding Event BindingMetadata
  • 28. www.edureka.co/angular-js Building Blocks – Directives Templates Metadata Services Data binding Components1 3 4 5 6 Directives7 Modules2 Dependency Injection 8 • Modify DOM elements and modify their Behaviours • Built-in directives helps in - • Extend or control DOM • Adding classes • And much more … • You can also write your own directives
  • 29. www.edureka.co/angular-js Building Blocks – Dependency Injection Templates Metadata Services Data binding Components1 3 4 5 6 Directives7 Modules2 Dependency Injection8 • A way to supply a new instance of a class with the fully-formed dependencies it requires like services • Provide new components with the services they need • An injector can create a new service instance from a provider Service Instances Class