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
PDF
Introduction To Jenkins - SpringPeople
PPTX
Phonegap android angualr material design
PDF
White Paper : ASP.NET Core AngularJs 2 and Prime
PDF
Introduction to CodeRush Xpress
PDF
Node in Production at Aviary
PDF
Introduction To Angular.js - SpringPeople
PPTX
Angular 4 Introduction Tutorial
Angular2 + Ng-Lightning + Lightning Design System = Great Apps
Introduction To Jenkins - SpringPeople
Phonegap android angualr material design
White Paper : ASP.NET Core AngularJs 2 and Prime
Introduction to CodeRush Xpress
Node in Production at Aviary
Introduction To Angular.js - SpringPeople
Angular 4 Introduction Tutorial

What's hot (20)

PDF
Jenkins Continuous Delivery
PPTX
Angular2 + New Firebase in Action
PDF
Building Blocks of Angular 2 and ASP.NET Core
PDF
Beautifying the Beautiful: Theming WSO2 API Manager
PPT
Building 3D Models with Skycatch & Autodesk Recap API's
PDF
React Context API
PPTX
Angular introduction students
PPTX
Angular 2 + TypeScript = true. Let's Play!
PDF
Azure functions
PDF
Introduction to Angular 2
PPTX
Why I am hooked on the future of React
PPTX
React.js - The Dawn of Virtual DOM
PDF
Introduction To Groovy And Grails - SpringPeople
PDF
O365Con18 - Automate your Tasks through Azure Functions - Elio Struyf
PPT
Angular App Presentation
PPTX
Magic of web components
PPTX
Angular 2 - a New Hope
PDF
O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...
PPTX
Angular js
Jenkins Continuous Delivery
Angular2 + New Firebase in Action
Building Blocks of Angular 2 and ASP.NET Core
Beautifying the Beautiful: Theming WSO2 API Manager
Building 3D Models with Skycatch & Autodesk Recap API's
React Context API
Angular introduction students
Angular 2 + TypeScript = true. Let's Play!
Azure functions
Introduction to Angular 2
Why I am hooked on the future of React
React.js - The Dawn of Virtual DOM
Introduction To Groovy And Grails - SpringPeople
O365Con18 - Automate your Tasks through Azure Functions - Elio Struyf
Angular App Presentation
Magic of web components
Angular 2 - a New Hope
O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...
Angular js
Ad

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

PDF
Angular Notes.pdf
PPTX
Angular kickstart slideshare
PPTX
Angular Basics.pptx
PDF
Angular Meetup 1 - Angular Basics and Workshop
PPTX
Angular 18 course for begineers and experienced
PPTX
Presentation on angular 5
PDF
Angular 2 overview in 60 minutes
PDF
Angular2 with type script
PPTX
AngularJS 1.x - your first application (problems and solutions)
PPTX
Foster - Getting started with Angular
PPTX
mean stack
PDF
Angular js
PDF
Angular js
PPTX
Angularj2.0
PPTX
Angular crash course
PPTX
Angularjs2 presentation
PDF
Introduction To Angular 4 - J2I
PPTX
Angular Framework ppt for beginners and advanced
PPTX
How Does Angular Work?
PPT
Angular.ppt
Angular Notes.pdf
Angular kickstart slideshare
Angular Basics.pptx
Angular Meetup 1 - Angular Basics and Workshop
Angular 18 course for begineers and experienced
Presentation on angular 5
Angular 2 overview in 60 minutes
Angular2 with type script
AngularJS 1.x - your first application (problems and solutions)
Foster - Getting started with Angular
mean stack
Angular js
Angular js
Angularj2.0
Angular crash course
Angularjs2 presentation
Introduction To Angular 4 - J2I
Angular Framework ppt for beginners and advanced
How Does Angular Work?
Angular.ppt
Ad

Recently uploaded (20)

PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Cloud computing and distributed systems.
PDF
Modernizing your data center with Dell and AMD
PDF
cuic standard and advanced reporting.pdf
PPTX
A Presentation on Artificial Intelligence
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Approach and Philosophy of On baking technology
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Encapsulation theory and applications.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
Dropbox Q2 2025 Financial Results & Investor Presentation
Spectral efficient network and resource selection model in 5G networks
20250228 LYD VKU AI Blended-Learning.pptx
Machine learning based COVID-19 study performance prediction
Per capita expenditure prediction using model stacking based on satellite ima...
Encapsulation_ Review paper, used for researhc scholars
Advanced methodologies resolving dimensionality complications for autism neur...
Cloud computing and distributed systems.
Modernizing your data center with Dell and AMD
cuic standard and advanced reporting.pdf
A Presentation on Artificial Intelligence
The AUB Centre for AI in Media Proposal.docx
NewMind AI Monthly Chronicles - July 2025
The Rise and Fall of 3GPP – Time for a Sabbatical?
Approach and Philosophy of On baking technology
NewMind AI Weekly Chronicles - August'25 Week I
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Encapsulation theory and applications.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
“AI and Expert System Decision Support & Business Intelligence Systems”

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: