SlideShare a Scribd company logo
Angular
( formerly Angular 4 )
One framework.
Mobile & desktop.
 Introduction of Angular.
 Features of Angular.
 Development environment setup.
 Project setup
 Structure of Angular project.
 How to install packages.
 What is TypeScript .
 How Angular application start.
 Components.
 How to create component.
 Styling component.
 Component selector.
 Databinding
Agenda
• Angular is an open source JavaScript framework that is used to
build single page based web applications.
• Developed by Google
• Release Date - March 2017
• One framework. Mobile & Desktop.
Angular
Cross
Platform
Speed and
Performance
Productivity Development
Features of Angular
Cross Platform
 Angular use modern web platform capabilities to deliver app-like experiences.
 High performance and zero-step installation.
 Build native mobile apps with Ionic Framework, NativeScript, and React Native.
 Create desktop - installed apps across Mac, Windows, and Linux.
Speed and Performance
 Angular turns our templates into code that's highly optimized for today's JavaScript
machines.
 Serve the first view of your application on node.js, .NET, PHP, and other servers for
rendering in just HTML and CSS. .
 Angular apps load quickly with the new Component Router.
Productivity
 Quickly create UI views with simple and powerful template syntax.
 Command line tools:
 Start building fast
 Add components and tests
 Then instantly deploy.
 Get intelligent code completion, instant errors in popular editors and IDEs.
Full Development Story
 Karma for unit tests.
 Protractor makes our scenario tests run faster and in a stable manner.
 Create high-performance, complex choreographies and animation timelines
with very little code through Angular's intuitive API.
Development Environment Setup
https://nodejs.org/en/download/
Node.js
• Node.js is an open-source, cross-platform JavaScript run-time environment for
executing JavaScript code server-side.
• Download latest version i.e. node v6.10.3
Syntax : - node -v
Check node.js version
• This command is used for checking
current installed version of node.
Syntax : - npm -vCheck npm version
• This command is used for checking
current installed version of Node Package
Manager (npm).
Text Editor
• Visual Studio Code, WebStrome , Sublime or any other text editor IDE
Project Setup
Install Angular CLI Angular CLI is command line interface for Angular
 Open node js command prompt in admin mode.
Syntax : - npm install –g <packagename>
F:/Angular4> npm install –g @angular/cli Node.js command prompt
Current working directory
Globally
Package Name
Step 2 Creating project using Angular CLI
Syntax : - ng new <project_name>
F:/Angular4> ng new MyFirstDemoApp Node.js command prompt
Current working directory
Project Name
Step 3 Enter into newly created project folder i.e. MyFirstDemoApp
Step 4 Run application
Syntax : - ng serve
F:/Angular4/MyFirstDemoApp> ng serve
 ng serve command is used for to run application.
Step 5 Open web browser - localhost:4200
Structure of project
NPM is the node package manager, which installs packages
locally into a project, specifically, into the node_modules
folder.
All images, stylesheets, JavaScript or third party libraries reside in
assets
Configuration Files
Root project folder, all components reside is app
folder.
Entry point of application
Installing Packages
npm install command is used for installing packages.
Syntax
npm install <package_name>
Example
F:/Angular4/MyFirstDemoApp> npm install bootsrap
How App Start
main.ts • Main.ts file is entry point of our application.
• Main.ts file bootstrap app.module.ts file
app.module.ts • This file bootstrap our first component i.e
app.component.ts
app.component.ts • This file render app.component.html file.
app.component.html • Final HTML template
TypeScript
 TypeScript is a free and open source programming language.
 It is developed and maintained by Microsoft.
 It is syntactical superset of JavaScript and adds optional static typings and class
based object oriented programming to the language.
Components
A Component consists of the following −
 Components are a logical piece of code for Angular application.
Component
Template Class Metadata
 Template is used to render
the view for the application.
 This contains the HTML that
needs to be rendered in the
application.
 This is like a class defined in any
language such as C#.
 This has the code which is used
to support the view.
 It is defined in TypeScript.
 This has the extra data
defined for the Angular class.
 It is defined with a decorator.
Decorator
Defines the name of the HTML tag.
It holds our HTML template.
The styles option is used to
style a specific component
 Defining a class called
AppComponent.
 The export keyword is used so that
the component can be used in other
modules in the application.
 title is the name of the property.
 The property is given a value of
‘app’.
We are using the import keyword to
import the ‘Component’ decorator
from the angular/core module.
Creating Component
 ng generate command is used for create component.
Syntax
ng generate component <component_name>
or
ng g c <component_name>
Example
F:/Angular4/MyFirstDemoApp>
ng g c server
Component Selector
By Element
Syntax
@Component({
selector: '[selector-name]',
templateUrl: ‘html - template',
styleUrls: [‘stylesheet']
})
Example
@Component({
selector: '[app-root]',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
<div selector_name> </div> <div app-root> </div>
Define by square brackets [ ] in selector name.
By Class
Syntax
@Component({
selector: ‘.selector-name',
templateUrl: ‘html - template',
styleUrls: [‘stylesheet']
})
Example
@Component({
selector: ‘.app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
<div class =“selector-name”>
</div>
<div class=“app-root”> </div>
Define by dot ( . ) in selector name.
Data binding
 Data binding is communication between business logic and views.
Typescript
Code
(Business
Logic)
Template
(HTML)
Data binding = Communication
Output Data
String Interpolation => {{ data }}
Property Binding => [property] = “ data “
String Interpolation Interpolation markup is used to provide data-binding to text and attribute values.
Syntax
export class <class_name>
{
variableName = ‘any string';
}
Example
export class AppComponent
{
title = ‘This is my demo app';
}
<div {{variableName }} >
</div>
<div {{ title }} > </div>
Property Binding
HTML
<button [disabled]="!isActive"
class="btn">ADD</button>
Typescript
export class ClientComponent {
isActive = false;
constructor() {
setTimeout(() =>
{ this.isActive = true; }, 2000); }
ngOnInit() { }
Property binding allow us to bind values to properties of an element to modify their
behavior or appearance. This can include properties such as class, disabled, href or
textContent.
www.cynoteck.com
Contact No: +1-612-800-9092, +918272014440,
+918430155522s
Website : www.cynoteck.com
Email : sales@Cynoteck.com
Contact handles
An Overview of Angular 4

More Related Content

PDF
SonarQube - Should I Stay or Should I Go ?
PPTX
SonarQube - The leading platform for Continuous Code Quality
PPTX
SonarQube Presentation.pptx
PPTX
Track code quality with SonarQube
PPTX
Jira Basic Concepts
PDF
DevTest Portfolio Overview
ODP
Test Automation Framework using Cucumber BDD overview (part 1)
PPTX
Angular overview
SonarQube - Should I Stay or Should I Go ?
SonarQube - The leading platform for Continuous Code Quality
SonarQube Presentation.pptx
Track code quality with SonarQube
Jira Basic Concepts
DevTest Portfolio Overview
Test Automation Framework using Cucumber BDD overview (part 1)
Angular overview

What's hot (20)

PPTX
PDF
OWASP DefectDojo - Open Source Security Sanity
PPTX
PPTX
Cucumber BDD
PDF
Tech Talk #5 : Code Analysis SonarQube - Lương Trọng Nghĩa
PPTX
What is an API Gateway?
PDF
DevOps - A Gentle Introduction
PPTX
Introduction to JIRA
PPTX
Maven ppt
PPTX
Dev ops != Dev+Ops
PDF
Mobile Application Development Proposal PowerPoint Presentation Slides
PPTX
Introducing OpenAPI Version 3.1
PPTX
JIRA Introduction | JIRA Tutorial | Atlassian JIRA Training | H2kinfosys
PPTX
GDSC FY Orientation.pptx
PPTX
Azure devops
PPT
Selenium
PPTX
SonarQube.pptx
PDF
Micro Frontend Platforms for Kubernetes
PDF
No drama here - E2E-testing django with playwright
PPTX
.Net Core
OWASP DefectDojo - Open Source Security Sanity
Cucumber BDD
Tech Talk #5 : Code Analysis SonarQube - Lương Trọng Nghĩa
What is an API Gateway?
DevOps - A Gentle Introduction
Introduction to JIRA
Maven ppt
Dev ops != Dev+Ops
Mobile Application Development Proposal PowerPoint Presentation Slides
Introducing OpenAPI Version 3.1
JIRA Introduction | JIRA Tutorial | Atlassian JIRA Training | H2kinfosys
GDSC FY Orientation.pptx
Azure devops
Selenium
SonarQube.pptx
Micro Frontend Platforms for Kubernetes
No drama here - E2E-testing django with playwright
.Net Core
Ad

Viewers also liked (7)

PDF
Angular 2 On Production
PDF
Angular 4 - Introdução
PPTX
WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)
PDF
Angular 4 for Java Developers
PDF
Angular 4 Tutorial | What's New In Angular 4 | Angular Training | Edureka
PDF
Alphorm.com Formation Angular - Les fondamentaux
ODP
Introduction to Angular 2
Angular 2 On Production
Angular 4 - Introdução
WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)
Angular 4 for Java Developers
Angular 4 Tutorial | What's New In Angular 4 | Angular Training | Edureka
Alphorm.com Formation Angular - Les fondamentaux
Introduction to Angular 2
Ad

Similar to An Overview of Angular 4 (20)

PPTX
Angular4 getting started
PPTX
Angular IO
PPTX
Angular kickstart slideshare
PDF
Angular Interview Questions-PDF.pdf
PDF
Angular 7 Firebase5 CRUD Operations with Reactive Forms
PDF
Integrating TypeScript with popular frameworks like React or Angular.pdf
PPTX
Angular 9
PPTX
How Does Angular Work?
PPTX
4 Anguadasdfasdasdfasdfsdfasdfaslar (1).pptx
PPTX
Web worker in your angular application
PDF
Angular - Chapter 1 - Introduction
PPTX
Angularjs2 presentation
PPTX
How create react app help in creating a new react applications
PPTX
UQ21CA642BA1-Unit-3-WAF-Class18-Introduction to Angular Routing.pptx
PDF
AngularJS Project Setup step-by- step guide - RapidValue Solutions
PDF
How to Implement Micro Frontend Architecture using Angular Framework
PPTX
PDF
Getting started with appium
PPTX
mean stack
PDF
Progressive Web Application by Citytech
Angular4 getting started
Angular IO
Angular kickstart slideshare
Angular Interview Questions-PDF.pdf
Angular 7 Firebase5 CRUD Operations with Reactive Forms
Integrating TypeScript with popular frameworks like React or Angular.pdf
Angular 9
How Does Angular Work?
4 Anguadasdfasdasdfasdfsdfasdfaslar (1).pptx
Web worker in your angular application
Angular - Chapter 1 - Introduction
Angularjs2 presentation
How create react app help in creating a new react applications
UQ21CA642BA1-Unit-3-WAF-Class18-Introduction to Angular Routing.pptx
AngularJS Project Setup step-by- step guide - RapidValue Solutions
How to Implement Micro Frontend Architecture using Angular Framework
Getting started with appium
mean stack
Progressive Web Application by Citytech

More from Cynoteck Technology Solutions Private Limited (20)

PDF
Delivering powerful integrations without code using out-of-the-box Salesforce...
PPTX
Test automation using selenium
PPT
Business process flow enhancement
PPT
Multi Select Option set in Microsoft Dynamics 365
PPTX
Microsoft Dynamics 365 for customer services
PPTX
PPTX
An Overview of Google Assistant
PPTX
Dynamics 365 for financials
PPT
Microsoft Dynamics 365 for Marketing
PPTX
Microsoft Dynamics 365 for sales
PPTX
Microsoft Dynamics 365- field services
PPTX
What is project service automation in dynamics 365
PPTX
An overview of what is dynamics 365
PDF
Here’s, how microsoft social engagement boost lead
Delivering powerful integrations without code using out-of-the-box Salesforce...
Test automation using selenium
Business process flow enhancement
Multi Select Option set in Microsoft Dynamics 365
Microsoft Dynamics 365 for customer services
An Overview of Google Assistant
Dynamics 365 for financials
Microsoft Dynamics 365 for Marketing
Microsoft Dynamics 365 for sales
Microsoft Dynamics 365- field services
What is project service automation in dynamics 365
An overview of what is dynamics 365
Here’s, how microsoft social engagement boost lead

Recently uploaded (20)

PPTX
history of c programming in notes for students .pptx
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
Online Work Permit System for Fast Permit Processing
PPTX
ai tools demonstartion for schools and inter college
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPT
Introduction Database Management System for Course Database
PDF
System and Network Administration Chapter 2
history of c programming in notes for students .pptx
ManageIQ - Sprint 268 Review - Slide Deck
Adobe Illustrator 28.6 Crack My Vision of Vector Design
ISO 45001 Occupational Health and Safety Management System
Upgrade and Innovation Strategies for SAP ERP Customers
Odoo Companies in India – Driving Business Transformation.pdf
Which alternative to Crystal Reports is best for small or large businesses.pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Online Work Permit System for Fast Permit Processing
ai tools demonstartion for schools and inter college
Softaken Excel to vCard Converter Software.pdf
How to Choose the Right IT Partner for Your Business in Malaysia
CHAPTER 2 - PM Management and IT Context
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Navsoft: AI-Powered Business Solutions & Custom Software Development
Introduction Database Management System for Course Database
System and Network Administration Chapter 2

An Overview of Angular 4

  • 1. Angular ( formerly Angular 4 ) One framework. Mobile & desktop.
  • 2.  Introduction of Angular.  Features of Angular.  Development environment setup.  Project setup  Structure of Angular project.  How to install packages.  What is TypeScript .  How Angular application start.  Components.  How to create component.  Styling component.  Component selector.  Databinding Agenda
  • 3. • Angular is an open source JavaScript framework that is used to build single page based web applications. • Developed by Google • Release Date - March 2017 • One framework. Mobile & Desktop. Angular
  • 5. Cross Platform  Angular use modern web platform capabilities to deliver app-like experiences.  High performance and zero-step installation.  Build native mobile apps with Ionic Framework, NativeScript, and React Native.  Create desktop - installed apps across Mac, Windows, and Linux.
  • 6. Speed and Performance  Angular turns our templates into code that's highly optimized for today's JavaScript machines.  Serve the first view of your application on node.js, .NET, PHP, and other servers for rendering in just HTML and CSS. .  Angular apps load quickly with the new Component Router.
  • 7. Productivity  Quickly create UI views with simple and powerful template syntax.  Command line tools:  Start building fast  Add components and tests  Then instantly deploy.  Get intelligent code completion, instant errors in popular editors and IDEs.
  • 8. Full Development Story  Karma for unit tests.  Protractor makes our scenario tests run faster and in a stable manner.  Create high-performance, complex choreographies and animation timelines with very little code through Angular's intuitive API.
  • 9. Development Environment Setup https://nodejs.org/en/download/ Node.js • Node.js is an open-source, cross-platform JavaScript run-time environment for executing JavaScript code server-side. • Download latest version i.e. node v6.10.3 Syntax : - node -v Check node.js version • This command is used for checking current installed version of node.
  • 10. Syntax : - npm -vCheck npm version • This command is used for checking current installed version of Node Package Manager (npm). Text Editor • Visual Studio Code, WebStrome , Sublime or any other text editor IDE
  • 11. Project Setup Install Angular CLI Angular CLI is command line interface for Angular  Open node js command prompt in admin mode. Syntax : - npm install –g <packagename> F:/Angular4> npm install –g @angular/cli Node.js command prompt Current working directory Globally Package Name
  • 12. Step 2 Creating project using Angular CLI Syntax : - ng new <project_name> F:/Angular4> ng new MyFirstDemoApp Node.js command prompt Current working directory Project Name
  • 13. Step 3 Enter into newly created project folder i.e. MyFirstDemoApp Step 4 Run application Syntax : - ng serve F:/Angular4/MyFirstDemoApp> ng serve  ng serve command is used for to run application.
  • 14. Step 5 Open web browser - localhost:4200
  • 15. Structure of project NPM is the node package manager, which installs packages locally into a project, specifically, into the node_modules folder. All images, stylesheets, JavaScript or third party libraries reside in assets Configuration Files Root project folder, all components reside is app folder. Entry point of application
  • 16. Installing Packages npm install command is used for installing packages. Syntax npm install <package_name> Example F:/Angular4/MyFirstDemoApp> npm install bootsrap
  • 17. How App Start main.ts • Main.ts file is entry point of our application. • Main.ts file bootstrap app.module.ts file app.module.ts • This file bootstrap our first component i.e app.component.ts app.component.ts • This file render app.component.html file. app.component.html • Final HTML template
  • 18. TypeScript  TypeScript is a free and open source programming language.  It is developed and maintained by Microsoft.  It is syntactical superset of JavaScript and adds optional static typings and class based object oriented programming to the language.
  • 19. Components A Component consists of the following −  Components are a logical piece of code for Angular application. Component Template Class Metadata  Template is used to render the view for the application.  This contains the HTML that needs to be rendered in the application.  This is like a class defined in any language such as C#.  This has the code which is used to support the view.  It is defined in TypeScript.  This has the extra data defined for the Angular class.  It is defined with a decorator.
  • 20. Decorator Defines the name of the HTML tag. It holds our HTML template. The styles option is used to style a specific component  Defining a class called AppComponent.  The export keyword is used so that the component can be used in other modules in the application.  title is the name of the property.  The property is given a value of ‘app’. We are using the import keyword to import the ‘Component’ decorator from the angular/core module.
  • 21. Creating Component  ng generate command is used for create component. Syntax ng generate component <component_name> or ng g c <component_name> Example F:/Angular4/MyFirstDemoApp> ng g c server
  • 22. Component Selector By Element Syntax @Component({ selector: '[selector-name]', templateUrl: ‘html - template', styleUrls: [‘stylesheet'] }) Example @Component({ selector: '[app-root]', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) <div selector_name> </div> <div app-root> </div> Define by square brackets [ ] in selector name.
  • 23. By Class Syntax @Component({ selector: ‘.selector-name', templateUrl: ‘html - template', styleUrls: [‘stylesheet'] }) Example @Component({ selector: ‘.app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) <div class =“selector-name”> </div> <div class=“app-root”> </div> Define by dot ( . ) in selector name.
  • 24. Data binding  Data binding is communication between business logic and views. Typescript Code (Business Logic) Template (HTML) Data binding = Communication Output Data String Interpolation => {{ data }} Property Binding => [property] = “ data “
  • 25. String Interpolation Interpolation markup is used to provide data-binding to text and attribute values. Syntax export class <class_name> { variableName = ‘any string'; } Example export class AppComponent { title = ‘This is my demo app'; } <div {{variableName }} > </div> <div {{ title }} > </div>
  • 26. Property Binding HTML <button [disabled]="!isActive" class="btn">ADD</button> Typescript export class ClientComponent { isActive = false; constructor() { setTimeout(() => { this.isActive = true; }, 2000); } ngOnInit() { } Property binding allow us to bind values to properties of an element to modify their behavior or appearance. This can include properties such as class, disabled, href or textContent.
  • 27. www.cynoteck.com Contact No: +1-612-800-9092, +918272014440, +918430155522s Website : www.cynoteck.com Email : sales@Cynoteck.com Contact handles

Editor's Notes

  • #3: Lesson descriptions should be brief.
  • #4: Example objectives At the end of this lesson, you will be able to: Save files to the team Web server. Move files to different locations on the team Web server. Share files on the team Web server.