SlideShare a Scribd company logo
- Ansley Stany Rodrigues
Agenda:
1. Theory and Concepts
2. Development environment setup
3. Live demo application
• Angular is an open source JavaScript framework that is used to build single page based web applications.
• Developed by Google
• One framework. Mobile & Desktop.
Angular:
Building Blocks of Angular2
Application
Angular Frameworks :
• Router
• Http
• Forms
• Upgrade
• Compiler
• Platform
• Core and common
Building Blocks of Angular2 continued …
Libraries :
• Rx
• RxJS (Reactive Extensions for JavaScript) is a library for reactive programming using observables that makes it easier to compose
asynchronous or callback-based code
• Reflect
• Zone
• System
• Shim
• A shim is a library that brings a new API to an older environment, using only the means of that environment.
Template:
• A template combines HTML with Angular markup that can modify HTML elements before they are displayed.
Template directives provide program logic, and binding markup connects your application data and the DOM.
There are two types of data binding:
• Event binding lets your app respond to user input in the target environment by updating your application
data.
• Property binding lets you interpolate values that are computed from your application data into the HTML.
Property Binding vs Event Binding :
Component :
• Components define views, which are sets of screen elements that Angular can choose among and modify
according to your program logic and data.
• Components use services, which provide specific functionality not directly related to views. Service providers
can be injected into components as dependencies, making your code modular, reusable, and efficient
Directives:
Built in Directives:
Custom Directives:
• An attribute directive minimally requires building a controller class annotated with @Directive, which
specifies the selector that identifies the attribute. The controller class implements the desired directive
behavior.
HostListener and HostBinding:
• @HostBinding and @HostListener are two decorators in Angular that can be really useful in custom directives.
@HostBinding lets you set properties on the element or component that hosts the directive, and @HostListener
lets you listen for events on the host element or component.
Use:
Dependency Injection:
• Dependency injection (DI) lets you keep your component classes lean and efficient.
Application injectors
Component injector:
Service:
• For data or logic that isn't associated with a specific view, and that you want to share across components, you
create a service class. A service class definition is immediately preceded by the @Injectable() decorator.
• The decorator provides the metadata that allows your service to be injected into client components as a
dependency.
Development environment setup:
Node.js :
Download and install node.js from https://nodejs.org/en/download/ (download a stable version - 8.x or
10.x or higher)
Check version using : node –v
Node package manager:
Check npm (Node package manager ) version : npm –v
Text Editor:
Visual Studio Code , Sublime or any IDE
• Install angular-cli globally using npm install -g @angular/cli
• To download a starter project navigate to https://stackblitz.com/ and click the Angular button to load a
starter project.
• alternatively you can also use the cli commands to generate a project from https://cli.angular.io/
Use download button to download the project (not required if using cli)
• Extract the project (not required if using cli)
• Open a command prompt from the folder.
• Run : npm install to install dependencies.
• If node-sass error, download the appropriate node-sass binary and set the path in system variables as SASS_BINARY_DIR
• Run : npm start to start the dev server .
• Navigate to localhost:4200 to see the app working.
main.ts
app.module.ts
app.component.ts
app.component.html
• Main.ts file is entry point of our application.
• Main.ts file bootstrap app.module.ts file
• This file bootstrap our first component i.e app.component.ts
• This file render app.component.html file.
• Final HTML template
How the app starts:
Demo application :
https://stackblitz.com/edit/angular-routing-databinding-injectable
References: https://angular.io/

More Related Content

PPTX
Angular2 + Ng-Lightning + Lightning Design System = Great Apps
Emily Hurn
 
PDF
Introduction To Jenkins - SpringPeople
SpringPeople
 
PPTX
Phonegap android angualr material design
Srinadh Kanugala
 
PDF
White Paper : ASP.NET Core AngularJs 2 and Prime
Hamida Rebai Trabelsi
 
PDF
Introduction to CodeRush Xpress
Erik Ralston
 
PDF
Node in Production at Aviary
Aviary
 
PDF
Introduction To Angular.js - SpringPeople
SpringPeople
 
PPTX
Angular 4 Introduction Tutorial
Scott Lee
 
Angular2 + Ng-Lightning + Lightning Design System = Great Apps
Emily Hurn
 
Introduction To Jenkins - SpringPeople
SpringPeople
 
Phonegap android angualr material design
Srinadh Kanugala
 
White Paper : ASP.NET Core AngularJs 2 and Prime
Hamida Rebai Trabelsi
 
Introduction to CodeRush Xpress
Erik Ralston
 
Node in Production at Aviary
Aviary
 
Introduction To Angular.js - SpringPeople
SpringPeople
 
Angular 4 Introduction Tutorial
Scott Lee
 

What's hot (20)

PDF
Jenkins Continuous Delivery
Jadson Santos
 
PPTX
Angular2 + New Firebase in Action
Ruben Chavarri
 
PDF
Building Blocks of Angular 2 and ASP.NET Core
Levi Fuller
 
PDF
Beautifying the Beautiful: Theming WSO2 API Manager
WSO2
 
PPT
Building 3D Models with Skycatch & Autodesk Recap API's
Christopher Bumgardner
 
PDF
React Context API
NodeXperts
 
PPTX
Angular introduction students
Christian John Felix
 
PPTX
Angular 2 + TypeScript = true. Let's Play!
Sirar Salih
 
PDF
Azure functions
Rajesh Kolla
 
PDF
Introduction to Angular 2
Dawid Myslak
 
PPTX
Why I am hooked on the future of React
Maurice De Beijer [MVP]
 
PPTX
React.js - The Dawn of Virtual DOM
Jimit Shah
 
PDF
Introduction To Groovy And Grails - SpringPeople
SpringPeople
 
PDF
O365Con18 - Automate your Tasks through Azure Functions - Elio Struyf
NCCOMMS
 
PPT
Angular App Presentation
Elizabeth Long
 
PPTX
Magic of web components
HYS Enterprise
 
PPTX
Angular 2 - a New Hope
Sami Suo-Heikki
 
PDF
O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...
NCCOMMS
 
PPTX
Angular js
Athira Mukundan
 
Jenkins Continuous Delivery
Jadson Santos
 
Angular2 + New Firebase in Action
Ruben Chavarri
 
Building Blocks of Angular 2 and ASP.NET Core
Levi Fuller
 
Beautifying the Beautiful: Theming WSO2 API Manager
WSO2
 
Building 3D Models with Skycatch & Autodesk Recap API's
Christopher Bumgardner
 
React Context API
NodeXperts
 
Angular introduction students
Christian John Felix
 
Angular 2 + TypeScript = true. Let's Play!
Sirar Salih
 
Azure functions
Rajesh Kolla
 
Introduction to Angular 2
Dawid Myslak
 
Why I am hooked on the future of React
Maurice De Beijer [MVP]
 
React.js - The Dawn of Virtual DOM
Jimit Shah
 
Introduction To Groovy And Grails - SpringPeople
SpringPeople
 
O365Con18 - Automate your Tasks through Azure Functions - Elio Struyf
NCCOMMS
 
Angular App Presentation
Elizabeth Long
 
Magic of web components
HYS Enterprise
 
Angular 2 - a New Hope
Sami Suo-Heikki
 
O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...
NCCOMMS
 
Angular js
Athira Mukundan
 
Ad

Similar to Introduction to angular | Concepts and Environment setup (20)

PPTX
Angular 9
Raja Vishnu
 
PPTX
4 Anguadasdfasdasdfasdfsdfasdfaslar (1).pptx
tilejak773
 
PPTX
Angular kickstart slideshare
SaleemMalik52
 
PPTX
Angular js firebase-preso
Avinash Kondagunta
 
PDF
Asp.NETZERO - A Workshop Presentation by Citytech Software
Ritwik Das
 
PPTX
Angularjs basic part01
Mohd Abdul Baquee
 
PPTX
INTRODUCTION TO REACT JAVASCRIPT FOR BEGINNERS.pptx
JamesGedza1
 
DOCX
Top 10 Javascript Frameworks For Easy Web Development
Technostacks Infotech Pvt. Ltd.
 
PPTX
NEXTjs.pptxfggfgfdgfgfdgfdgfdgfdgfdgfdgfg
zmulani8
 
PPTX
Angular patterns
Premkumar M
 
PPTX
Angular Basics.pptx
AshokKumar616995
 
PPT
Top java script frameworks ppt
Omkarsoft Bangalore
 
PPTX
Angular4 getting started
TejinderMakkar
 
PPTX
Dirigible powered by Orion for Cloud Development (EclipseCon EU 2015)
Nedelcho Delchev
 
PPTX
AngularJS is awesome
Eusebiu Schipor
 
PDF
Angular meetup 2 2019-08-29
Nitin Bhojwani
 
PPTX
Angular IO
Jennifer Estrada
 
PPTX
Spring Web Presentation - Framework and Its Ecosystem
horiadobrin
 
PPTX
AngularJS 1.x - your first application (problems and solutions)
Igor Talevski
 
PPTX
Web worker in your angular application
Suresh Patidar
 
Angular 9
Raja Vishnu
 
4 Anguadasdfasdasdfasdfsdfasdfaslar (1).pptx
tilejak773
 
Angular kickstart slideshare
SaleemMalik52
 
Angular js firebase-preso
Avinash Kondagunta
 
Asp.NETZERO - A Workshop Presentation by Citytech Software
Ritwik Das
 
Angularjs basic part01
Mohd Abdul Baquee
 
INTRODUCTION TO REACT JAVASCRIPT FOR BEGINNERS.pptx
JamesGedza1
 
Top 10 Javascript Frameworks For Easy Web Development
Technostacks Infotech Pvt. Ltd.
 
NEXTjs.pptxfggfgfdgfgfdgfdgfdgfdgfdgfdgfg
zmulani8
 
Angular patterns
Premkumar M
 
Angular Basics.pptx
AshokKumar616995
 
Top java script frameworks ppt
Omkarsoft Bangalore
 
Angular4 getting started
TejinderMakkar
 
Dirigible powered by Orion for Cloud Development (EclipseCon EU 2015)
Nedelcho Delchev
 
AngularJS is awesome
Eusebiu Schipor
 
Angular meetup 2 2019-08-29
Nitin Bhojwani
 
Angular IO
Jennifer Estrada
 
Spring Web Presentation - Framework and Its Ecosystem
horiadobrin
 
AngularJS 1.x - your first application (problems and solutions)
Igor Talevski
 
Web worker in your angular application
Suresh Patidar
 
Ad

Recently uploaded (20)

PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PPTX
How to Build a Scalable Micro-Investing Platform in 2025 - A Founder’s Guide ...
Third Rock Techkno
 
PPTX
Stamford - Community User Group Leaders_ Agentblazer Status, AI Sustainabilit...
Amol Dixit
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
Building High-Performance Oracle Teams: Strategic Staffing for Database Manag...
SMACT Works
 
PPTX
Coupa-Overview _Assumptions presentation
annapureddyn
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
PDF
Chapter 2 Digital Image Fundamentals.pdf
Getnet Tigabie Askale -(GM)
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PPT
Coupa-Kickoff-Meeting-Template presentai
annapureddyn
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
How to Build a Scalable Micro-Investing Platform in 2025 - A Founder’s Guide ...
Third Rock Techkno
 
Stamford - Community User Group Leaders_ Agentblazer Status, AI Sustainabilit...
Amol Dixit
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Building High-Performance Oracle Teams: Strategic Staffing for Database Manag...
SMACT Works
 
Coupa-Overview _Assumptions presentation
annapureddyn
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
Chapter 2 Digital Image Fundamentals.pdf
Getnet Tigabie Askale -(GM)
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Coupa-Kickoff-Meeting-Template presentai
annapureddyn
 

Introduction to angular | Concepts and Environment setup

  • 1. - Ansley Stany Rodrigues
  • 2. Agenda: 1. Theory and Concepts 2. Development environment setup 3. Live demo application
  • 3. • Angular is an open source JavaScript framework that is used to build single page based web applications. • Developed by Google • One framework. Mobile & Desktop. Angular:
  • 4. Building Blocks of Angular2 Application
  • 5. Angular Frameworks : • Router • Http • Forms • Upgrade • Compiler • Platform • Core and common Building Blocks of Angular2 continued …
  • 6. Libraries : • Rx • RxJS (Reactive Extensions for JavaScript) is a library for reactive programming using observables that makes it easier to compose asynchronous or callback-based code • Reflect • Zone • System • Shim • A shim is a library that brings a new API to an older environment, using only the means of that environment.
  • 7. Template: • A template combines HTML with Angular markup that can modify HTML elements before they are displayed. Template directives provide program logic, and binding markup connects your application data and the DOM. There are two types of data binding: • Event binding lets your app respond to user input in the target environment by updating your application data. • Property binding lets you interpolate values that are computed from your application data into the HTML.
  • 8. Property Binding vs Event Binding :
  • 9. Component : • Components define views, which are sets of screen elements that Angular can choose among and modify according to your program logic and data. • Components use services, which provide specific functionality not directly related to views. Service providers can be injected into components as dependencies, making your code modular, reusable, and efficient
  • 12. Custom Directives: • An attribute directive minimally requires building a controller class annotated with @Directive, which specifies the selector that identifies the attribute. The controller class implements the desired directive behavior.
  • 13. HostListener and HostBinding: • @HostBinding and @HostListener are two decorators in Angular that can be really useful in custom directives. @HostBinding lets you set properties on the element or component that hosts the directive, and @HostListener lets you listen for events on the host element or component.
  • 14. Use:
  • 15. Dependency Injection: • Dependency injection (DI) lets you keep your component classes lean and efficient. Application injectors
  • 17. Service: • For data or logic that isn't associated with a specific view, and that you want to share across components, you create a service class. A service class definition is immediately preceded by the @Injectable() decorator. • The decorator provides the metadata that allows your service to be injected into client components as a dependency.
  • 18. Development environment setup: Node.js : Download and install node.js from https://nodejs.org/en/download/ (download a stable version - 8.x or 10.x or higher) Check version using : node –v Node package manager: Check npm (Node package manager ) version : npm –v Text Editor: Visual Studio Code , Sublime or any IDE
  • 19. • Install angular-cli globally using npm install -g @angular/cli • To download a starter project navigate to https://stackblitz.com/ and click the Angular button to load a starter project. • alternatively you can also use the cli commands to generate a project from https://cli.angular.io/
  • 20. Use download button to download the project (not required if using cli)
  • 21. • Extract the project (not required if using cli) • Open a command prompt from the folder. • Run : npm install to install dependencies. • If node-sass error, download the appropriate node-sass binary and set the path in system variables as SASS_BINARY_DIR • Run : npm start to start the dev server . • Navigate to localhost:4200 to see the app working.
  • 22. main.ts app.module.ts app.component.ts app.component.html • Main.ts file is entry point of our application. • Main.ts file bootstrap app.module.ts file • This file bootstrap our first component i.e app.component.ts • This file render app.component.html file. • Final HTML template How the app starts: