SlideShare a Scribd company logo
Fly High with
Angular
By Rajdeep Mandrekar & Wolfgang Furtado

GETTINGSTARTEDWITHANGULAR
Prerequisites
➔ Setting up the machine
◆ Install nvm (https://github.com/creationix/nvm#installation)
◆ Install node (nvm install v8.9.2)
◆ Install yarn (npm install -g yarn)
◆ Install angular-cli (npm install -g @angular/cli)
➔ Basic knowledge of HTML, CSS and JS

Fly High With Angular - How to build an app using Angular
WhatisAngular?
➔ Angular is a TypeScript-based open-source front-end web
application platform for dynamic web applications
➔ Created by the Angular Team at Google
➔ Provides a way to organize your HTML, JavaScript, and CSS
to keep your front-end code clean.
WhyAngular?
➔ Magical Two-Way data binding
➔ Routing Support
➔ Structured front end code
➔ Teach HTML new syntax with directives
➔ Huge community support
AngularArchitecture

TypeScript
➔ Typescript is a typed superset of Javascript that compiles to
plain Javascript
➔ It differentiates itself from competitors like CoffeeScript
and Dart in that plain JavaScript code can be intermixed
with TypeScript. Therefore JavaScript is TypeScript.
➔ JavaScript is TypeScript, but TypeScript is not JavaScript.
TypeScript
➔ Optional static typing (the key here is optional)
➔ Type Inference, which gives some of the benefits of types,
without actually using them
➔ Access to ES6 and ES7 features, before they become
supported by major browsers
➔ The ability to compile down to a version of JavaScript that
runs on all browsers
➔ Great tooling support with IntelliSense
GeneratingAngularproject
➔ Use Angular CLI
➔ Why angular cli?
◆ Generates a clean project structure
◆ Auto compile code on save
◆ In-built server & compiler (error detection is fast)
◆ Manages all the npm dependencies
GeneratingAngularproject
> npm install -g @angular/cli
> ng new fly-with-angular
> cd fly-with-angular
> ng serve
LET’SGOTHROUGHTHEPROJECTFOLDER
STRUCTURE
HOWDOESANANGULARAPPBOOTSTRAP?
COMPONENTS

Whatisacomponent?
➔ Components are the building blocks of Angular
applications.
➔ A component controls a patch of screen called a view.
➔ They easily nest one inside the other
➔ Each component may have its own: Class file, HTML file,
CSS file
Componenttree
Creatingacomponent
> ng generate component trips-list
Whatyou’llbebuilding
Fly High With Angular - How to build an app using Angular
Databinding
Is automatic synchronization of data between the model and
view components.
➔ One-way from data source to view target
{{expression}}
[target]="expression"
➔ One-way from view target to data source
➔ Two-way
(event)="statement"
[(target)]="expression"
➔ Property
<img [src]="heroImageUrl">
<my-app [book]="currentBook"></my-app>
<div [ngClass]="{'special': isSpecial}"></div>
➔ Event
➔ Attribute
<button (click)="onSave()">Save</button>
<img [attr.alt]="help" src="./..">
➔ Class
➔ Style
➔ Two-way (Banana in a box)
<div [class.special]="isSpecial">Special</div>
<button [style.color]="isSpecial ? 'red' : 'green'">
<input [(ngModel)]="name">
Fly High With Angular - How to build an app using Angular
Fly High With Angular - How to build an app using Angular
Fly High With Angular - How to build an app using Angular
Interface
In simple words interfaces is a way of describing the shape of
the JavaScript object.
It helps us keep our programs error-free by providing
information about the shape of the data we work with.
Class:
While class deals with the implementation.
Fly High With Angular - How to build an app using Angular
export interface Person {
firstName: string;
lastName: string;
age: number;
}
Fly High With Angular - How to build an app using Angular
Directives
Directives is how we add dynamic behavior to HTML . There
are 3 kinds of directive
➔ Components
◆ directives with a template
➔ Structural directives
◆ change the DOM layout by adding and removing DOM elements.
➔ Attribute directives
◆ change the appearance or behavior of an element, component, or another
directive.
Some most common used directives:
➔ ngIf => *ngIf="persons.length == 0"
➔ ngFor => *ngFor="let person of persons"
➔ ngSwitch/ngSwitchCase
➔ ngValue
➔ ngModel
Fly High With Angular - How to build an app using Angular
Pipes
➔ A pipe takes in data as input and transforms it to a desired
output.
➔ Ex: DatePipe, UpperCasePipe, LowerCasePipe,
CurrencyPipe, etc.
{{‘abc’ | uppercase}}
abc ABC
Fly High With Angular - How to build an app using Angular
EventBinding
➔ With event binding you can respond to any DOM event.
➔ To bind to a event binding, surround the DOM event name
in parentheses and assign a quoted template statement to
it.
Eg. <button (click)="doAwesomeThing()">Click me!</button>
Forms
There are two ways to build forms:
➔ Reactive Forms
➔ Template-driven forms
The two technologies belong to the @angular/forms library
and share a common set of form control classes.
ReactiveForms
➔ Angular reactive forms favors explicit management of the
data flow between UI elements and server data.
➔ With reactive forms, you create a tree of Angular form
control objects in the component class.
➔ Bind form controls to native form control elements in the
component template.
Template-drivenforms
➔ You place HTML form controls (such as <input> and
<select>) in the component template and bind them to
data model properties in the component, using directives
like ngModel.
➔ You don't create Angular form control objects
➔ You don't push and pull data values. Angular handles that
for you with ngModel
➔ Angular updates the mutable data model with user
changes as they happen.
Template-drivenvsReactiveForms
➔ Reactive forms does not mutate the data model whereas
template-driven forms does.
➔ Reactive forms are synchronous. Template-driven forms
are asynchronous.
➔ In template-driven forms you can't pass the validator in
like you can for reactive forms. Instead, you need to add a
directive to the template.
ReactiveForms
Import ReactiveFormsModule
Add to imports list
<div class="form-group">
<label for="name">Name</label>
<input type="text" class="form-control" id="name”
[(ngModel)]="model.name" name="name">
</div>
FormValidations
Why validate forms?
➔ For accuracy and completeness.
➔ Form validation is required to prevent web form abuse by
malicious users.
➔ Improper validation of form data is one of the main causes
of security vulnerabilities.
➔ It exposes your website to attacks such as header
injections, cross-site scripting, and SQL injections etc
ValidateReactiveForms
➔ In a reactive form, the source of truth is the component
class.
➔ Add validator functions directly to the form control model
in the component class
➔ Angular then calls these functions whenever the value of
the control changes.
Built-inValidators
➔ min
➔ max
➔ required
➔ email
➔ minLength
➔ maxLength
➔ Pattern
You can also create your custom validators and pass it to the
form.
Fly High With Angular - How to build an app using Angular
THANKYOU
Fly High With Angular - How to build an app using Angular
https://tinyurl.com/vlangular
Ad

More Related Content

What's hot (20)

Angular js tutorial slides
Angular js tutorial slidesAngular js tutorial slides
Angular js tutorial slides
samhelman
 
AngularJS Best Practices
AngularJS Best PracticesAngularJS Best Practices
AngularJS Best Practices
Narek Mamikonyan
 
Angularjs architecture
Angularjs architectureAngularjs architecture
Angularjs architecture
Michael He
 
AngularJS intro
AngularJS introAngularJS intro
AngularJS intro
dizabl
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - Introduction
Sagar Acharya
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular js
Aayush Shrestha
 
Introduction of angular js
Introduction of angular jsIntroduction of angular js
Introduction of angular js
Tamer Solieman
 
AngularJS Basics
AngularJS BasicsAngularJS Basics
AngularJS Basics
Ravi Mone
 
Getting Started with Angular JS
Getting Started with Angular JSGetting Started with Angular JS
Getting Started with Angular JS
Akshay Mathur
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
David Parsons
 
AngularJS best-practices
AngularJS best-practicesAngularJS best-practices
AngularJS best-practices
Henry Tao
 
AngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedAngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get started
Stéphane Bégaudeau
 
Angular JS Indtrodution
Angular JS IndtrodutionAngular JS Indtrodution
Angular JS Indtrodution
adesh21
 
Step by Step - AngularJS
Step by Step - AngularJSStep by Step - AngularJS
Step by Step - AngularJS
Infragistics
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
Jussi Pohjolainen
 
Dynamic Application Development by NodeJS ,AngularJS with OrientDB
Dynamic Application Development by NodeJS ,AngularJS with OrientDBDynamic Application Development by NodeJS ,AngularJS with OrientDB
Dynamic Application Development by NodeJS ,AngularJS with OrientDB
Apaichon Punopas
 
Web Components Everywhere
Web Components EverywhereWeb Components Everywhere
Web Components Everywhere
Ilia Idakiev
 
Gettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJSGettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJS
Armin Vieweg
 
AngularJS in 60ish Minutes
AngularJS in 60ish MinutesAngularJS in 60ish Minutes
AngularJS in 60ish Minutes
Dan Wahlin
 
AngularJS Introduction
AngularJS IntroductionAngularJS Introduction
AngularJS Introduction
Carlos Morales
 
Angular js tutorial slides
Angular js tutorial slidesAngular js tutorial slides
Angular js tutorial slides
samhelman
 
Angularjs architecture
Angularjs architectureAngularjs architecture
Angularjs architecture
Michael He
 
AngularJS intro
AngularJS introAngularJS intro
AngularJS intro
dizabl
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - Introduction
Sagar Acharya
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular js
Aayush Shrestha
 
Introduction of angular js
Introduction of angular jsIntroduction of angular js
Introduction of angular js
Tamer Solieman
 
AngularJS Basics
AngularJS BasicsAngularJS Basics
AngularJS Basics
Ravi Mone
 
Getting Started with Angular JS
Getting Started with Angular JSGetting Started with Angular JS
Getting Started with Angular JS
Akshay Mathur
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
David Parsons
 
AngularJS best-practices
AngularJS best-practicesAngularJS best-practices
AngularJS best-practices
Henry Tao
 
AngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedAngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get started
Stéphane Bégaudeau
 
Angular JS Indtrodution
Angular JS IndtrodutionAngular JS Indtrodution
Angular JS Indtrodution
adesh21
 
Step by Step - AngularJS
Step by Step - AngularJSStep by Step - AngularJS
Step by Step - AngularJS
Infragistics
 
Dynamic Application Development by NodeJS ,AngularJS with OrientDB
Dynamic Application Development by NodeJS ,AngularJS with OrientDBDynamic Application Development by NodeJS ,AngularJS with OrientDB
Dynamic Application Development by NodeJS ,AngularJS with OrientDB
Apaichon Punopas
 
Web Components Everywhere
Web Components EverywhereWeb Components Everywhere
Web Components Everywhere
Ilia Idakiev
 
Gettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJSGettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJS
Armin Vieweg
 
AngularJS in 60ish Minutes
AngularJS in 60ish MinutesAngularJS in 60ish Minutes
AngularJS in 60ish Minutes
Dan Wahlin
 
AngularJS Introduction
AngularJS IntroductionAngularJS Introduction
AngularJS Introduction
Carlos Morales
 

Similar to Fly High With Angular - How to build an app using Angular (20)

Angular Js Get Started - Complete Course
Angular Js Get Started - Complete CourseAngular Js Get Started - Complete Course
Angular Js Get Started - Complete Course
EPAM Systems
 
Angularjs Basics
Angularjs BasicsAngularjs Basics
Angularjs Basics
Anuradha Bandara
 
Angular Framework ppt for beginners and advanced
Angular Framework ppt for beginners and advancedAngular Framework ppt for beginners and advanced
Angular Framework ppt for beginners and advanced
Preetha Ganapathi
 
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
WebStackAcademy
 
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
Suresh Patidar
 
AngularJS Workshop
AngularJS WorkshopAngularJS Workshop
AngularJS Workshop
Gianluca Cacace
 
SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015
Pushkar Chivate
 
mean stack
mean stackmean stack
mean stack
michaelaaron25322
 
Fundaments of Knockout js
Fundaments of Knockout jsFundaments of Knockout js
Fundaments of Knockout js
Flavius-Radu Demian
 
AngularJS
AngularJSAngularJS
AngularJS
Srivatsan Krishnamachari
 
Angular js 1.3 presentation for fed nov 2014
Angular js 1.3 presentation for fed   nov 2014Angular js 1.3 presentation for fed   nov 2014
Angular js 1.3 presentation for fed nov 2014
Sarah Hudson
 
angular-concepts-introduction-slides.pptx
angular-concepts-introduction-slides.pptxangular-concepts-introduction-slides.pptx
angular-concepts-introduction-slides.pptx
shekharmpatil1309
 
Web components - An Introduction
Web components - An IntroductionWeb components - An Introduction
Web components - An Introduction
cherukumilli2
 
Unit 2 - Data Binding.pptx
Unit 2 - Data Binding.pptxUnit 2 - Data Binding.pptx
Unit 2 - Data Binding.pptx
Malla Reddy University
 
Moving from AS3 to Flex - advantages, hazards, traps
Moving from AS3 to Flex - advantages, hazards, trapsMoving from AS3 to Flex - advantages, hazards, traps
Moving from AS3 to Flex - advantages, hazards, traps
Florian Weil
 
Overview of the AngularJS framework
Overview of the AngularJS framework Overview of the AngularJS framework
Overview of the AngularJS framework
Yakov Fain
 
Polymer
Polymer Polymer
Polymer
jskvara
 
4 Anguadasdfasdasdfasdfsdfasdfaslar (1).pptx
4 Anguadasdfasdasdfasdfsdfasdfaslar (1).pptx4 Anguadasdfasdasdfasdfsdfasdfaslar (1).pptx
4 Anguadasdfasdasdfasdfsdfasdfaslar (1).pptx
tilejak773
 
Practical AngularJS
Practical AngularJSPractical AngularJS
Practical AngularJS
Wei Ru
 
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJSAngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
murtazahaveliwala
 
Angular Js Get Started - Complete Course
Angular Js Get Started - Complete CourseAngular Js Get Started - Complete Course
Angular Js Get Started - Complete Course
EPAM Systems
 
Angular Framework ppt for beginners and advanced
Angular Framework ppt for beginners and advancedAngular Framework ppt for beginners and advanced
Angular Framework ppt for beginners and advanced
Preetha Ganapathi
 
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
WebStackAcademy
 
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
Suresh Patidar
 
SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015
Pushkar Chivate
 
Angular js 1.3 presentation for fed nov 2014
Angular js 1.3 presentation for fed   nov 2014Angular js 1.3 presentation for fed   nov 2014
Angular js 1.3 presentation for fed nov 2014
Sarah Hudson
 
angular-concepts-introduction-slides.pptx
angular-concepts-introduction-slides.pptxangular-concepts-introduction-slides.pptx
angular-concepts-introduction-slides.pptx
shekharmpatil1309
 
Web components - An Introduction
Web components - An IntroductionWeb components - An Introduction
Web components - An Introduction
cherukumilli2
 
Moving from AS3 to Flex - advantages, hazards, traps
Moving from AS3 to Flex - advantages, hazards, trapsMoving from AS3 to Flex - advantages, hazards, traps
Moving from AS3 to Flex - advantages, hazards, traps
Florian Weil
 
Overview of the AngularJS framework
Overview of the AngularJS framework Overview of the AngularJS framework
Overview of the AngularJS framework
Yakov Fain
 
Polymer
Polymer Polymer
Polymer
jskvara
 
4 Anguadasdfasdasdfasdfsdfasdfaslar (1).pptx
4 Anguadasdfasdasdfasdfsdfasdfaslar (1).pptx4 Anguadasdfasdasdfasdfsdfasdfaslar (1).pptx
4 Anguadasdfasdasdfasdfsdfasdfaslar (1).pptx
tilejak773
 
Practical AngularJS
Practical AngularJSPractical AngularJS
Practical AngularJS
Wei Ru
 
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJSAngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
murtazahaveliwala
 
Ad

Recently uploaded (20)

Passive House Canada Conference 2025 Presentation [Final]_v4.ppt
Passive House Canada Conference 2025 Presentation [Final]_v4.pptPassive House Canada Conference 2025 Presentation [Final]_v4.ppt
Passive House Canada Conference 2025 Presentation [Final]_v4.ppt
IES VE
 
How to Troubleshoot 9 Types of OutOfMemoryError
How to Troubleshoot 9 Types of OutOfMemoryErrorHow to Troubleshoot 9 Types of OutOfMemoryError
How to Troubleshoot 9 Types of OutOfMemoryError
Tier1 app
 
How to Install and Activate ListGrabber Plugin
How to Install and Activate ListGrabber PluginHow to Install and Activate ListGrabber Plugin
How to Install and Activate ListGrabber Plugin
eGrabber
 
Beyond the code. Complexity - 2025.05 - SwiftCraft
Beyond the code. Complexity - 2025.05 - SwiftCraftBeyond the code. Complexity - 2025.05 - SwiftCraft
Beyond the code. Complexity - 2025.05 - SwiftCraft
Dmitrii Ivanov
 
Unit Two - Java Architecture and OOPS
Unit Two  -   Java Architecture and OOPSUnit Two  -   Java Architecture and OOPS
Unit Two - Java Architecture and OOPS
Nabin Dhakal
 
Mobile Application Developer Dubai | Custom App Solutions by Ajath
Mobile Application Developer Dubai | Custom App Solutions by AjathMobile Application Developer Dubai | Custom App Solutions by Ajath
Mobile Application Developer Dubai | Custom App Solutions by Ajath
Ajath Infotech Technologies LLC
 
Top Magento Hyvä Theme Features That Make It Ideal for E-commerce.pdf
Top Magento Hyvä Theme Features That Make It Ideal for E-commerce.pdfTop Magento Hyvä Theme Features That Make It Ideal for E-commerce.pdf
Top Magento Hyvä Theme Features That Make It Ideal for E-commerce.pdf
evrigsolution
 
Adobe Media Encoder Crack FREE Download 2025
Adobe Media Encoder  Crack FREE Download 2025Adobe Media Encoder  Crack FREE Download 2025
Adobe Media Encoder Crack FREE Download 2025
zafranwaqar90
 
Solar-wind hybrid engery a system sustainable power
Solar-wind  hybrid engery a system sustainable powerSolar-wind  hybrid engery a system sustainable power
Solar-wind hybrid engery a system sustainable power
bhoomigowda12345
 
AEM User Group DACH - 2025 Inaugural Meeting
AEM User Group DACH - 2025 Inaugural MeetingAEM User Group DACH - 2025 Inaugural Meeting
AEM User Group DACH - 2025 Inaugural Meeting
jennaf3
 
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World ExamplesMastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
jamescantor38
 
Exchange Migration Tool- Shoviv Software
Exchange Migration Tool- Shoviv SoftwareExchange Migration Tool- Shoviv Software
Exchange Migration Tool- Shoviv Software
Shoviv Software
 
Serato DJ Pro Crack Latest Version 2025??
Serato DJ Pro Crack Latest Version 2025??Serato DJ Pro Crack Latest Version 2025??
Serato DJ Pro Crack Latest Version 2025??
Web Designer
 
Programs as Values - Write code and don't get lost
Programs as Values - Write code and don't get lostPrograms as Values - Write code and don't get lost
Programs as Values - Write code and don't get lost
Pierangelo Cecchetto
 
Adobe InDesign Crack FREE Download 2025 link
Adobe InDesign Crack FREE Download 2025 linkAdobe InDesign Crack FREE Download 2025 link
Adobe InDesign Crack FREE Download 2025 link
mahmadzubair09
 
Deploying & Testing Agentforce - End-to-end with Copado - Ewenb Clark
Deploying & Testing Agentforce - End-to-end with Copado - Ewenb ClarkDeploying & Testing Agentforce - End-to-end with Copado - Ewenb Clark
Deploying & Testing Agentforce - End-to-end with Copado - Ewenb Clark
Peter Caitens
 
Adobe Audition Crack FRESH Version 2025 FREE
Adobe Audition Crack FRESH Version 2025 FREEAdobe Audition Crack FRESH Version 2025 FREE
Adobe Audition Crack FRESH Version 2025 FREE
zafranwaqar90
 
Download MathType Crack Version 2025???
Download MathType Crack  Version 2025???Download MathType Crack  Version 2025???
Download MathType Crack Version 2025???
Google
 
Download 4k Video Downloader Crack Pre-Activated
Download 4k Video Downloader Crack Pre-ActivatedDownload 4k Video Downloader Crack Pre-Activated
Download 4k Video Downloader Crack Pre-Activated
Web Designer
 
How I solved production issues with OpenTelemetry
How I solved production issues with OpenTelemetryHow I solved production issues with OpenTelemetry
How I solved production issues with OpenTelemetry
Cees Bos
 
Passive House Canada Conference 2025 Presentation [Final]_v4.ppt
Passive House Canada Conference 2025 Presentation [Final]_v4.pptPassive House Canada Conference 2025 Presentation [Final]_v4.ppt
Passive House Canada Conference 2025 Presentation [Final]_v4.ppt
IES VE
 
How to Troubleshoot 9 Types of OutOfMemoryError
How to Troubleshoot 9 Types of OutOfMemoryErrorHow to Troubleshoot 9 Types of OutOfMemoryError
How to Troubleshoot 9 Types of OutOfMemoryError
Tier1 app
 
How to Install and Activate ListGrabber Plugin
How to Install and Activate ListGrabber PluginHow to Install and Activate ListGrabber Plugin
How to Install and Activate ListGrabber Plugin
eGrabber
 
Beyond the code. Complexity - 2025.05 - SwiftCraft
Beyond the code. Complexity - 2025.05 - SwiftCraftBeyond the code. Complexity - 2025.05 - SwiftCraft
Beyond the code. Complexity - 2025.05 - SwiftCraft
Dmitrii Ivanov
 
Unit Two - Java Architecture and OOPS
Unit Two  -   Java Architecture and OOPSUnit Two  -   Java Architecture and OOPS
Unit Two - Java Architecture and OOPS
Nabin Dhakal
 
Mobile Application Developer Dubai | Custom App Solutions by Ajath
Mobile Application Developer Dubai | Custom App Solutions by AjathMobile Application Developer Dubai | Custom App Solutions by Ajath
Mobile Application Developer Dubai | Custom App Solutions by Ajath
Ajath Infotech Technologies LLC
 
Top Magento Hyvä Theme Features That Make It Ideal for E-commerce.pdf
Top Magento Hyvä Theme Features That Make It Ideal for E-commerce.pdfTop Magento Hyvä Theme Features That Make It Ideal for E-commerce.pdf
Top Magento Hyvä Theme Features That Make It Ideal for E-commerce.pdf
evrigsolution
 
Adobe Media Encoder Crack FREE Download 2025
Adobe Media Encoder  Crack FREE Download 2025Adobe Media Encoder  Crack FREE Download 2025
Adobe Media Encoder Crack FREE Download 2025
zafranwaqar90
 
Solar-wind hybrid engery a system sustainable power
Solar-wind  hybrid engery a system sustainable powerSolar-wind  hybrid engery a system sustainable power
Solar-wind hybrid engery a system sustainable power
bhoomigowda12345
 
AEM User Group DACH - 2025 Inaugural Meeting
AEM User Group DACH - 2025 Inaugural MeetingAEM User Group DACH - 2025 Inaugural Meeting
AEM User Group DACH - 2025 Inaugural Meeting
jennaf3
 
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World ExamplesMastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
jamescantor38
 
Exchange Migration Tool- Shoviv Software
Exchange Migration Tool- Shoviv SoftwareExchange Migration Tool- Shoviv Software
Exchange Migration Tool- Shoviv Software
Shoviv Software
 
Serato DJ Pro Crack Latest Version 2025??
Serato DJ Pro Crack Latest Version 2025??Serato DJ Pro Crack Latest Version 2025??
Serato DJ Pro Crack Latest Version 2025??
Web Designer
 
Programs as Values - Write code and don't get lost
Programs as Values - Write code and don't get lostPrograms as Values - Write code and don't get lost
Programs as Values - Write code and don't get lost
Pierangelo Cecchetto
 
Adobe InDesign Crack FREE Download 2025 link
Adobe InDesign Crack FREE Download 2025 linkAdobe InDesign Crack FREE Download 2025 link
Adobe InDesign Crack FREE Download 2025 link
mahmadzubair09
 
Deploying & Testing Agentforce - End-to-end with Copado - Ewenb Clark
Deploying & Testing Agentforce - End-to-end with Copado - Ewenb ClarkDeploying & Testing Agentforce - End-to-end with Copado - Ewenb Clark
Deploying & Testing Agentforce - End-to-end with Copado - Ewenb Clark
Peter Caitens
 
Adobe Audition Crack FRESH Version 2025 FREE
Adobe Audition Crack FRESH Version 2025 FREEAdobe Audition Crack FRESH Version 2025 FREE
Adobe Audition Crack FRESH Version 2025 FREE
zafranwaqar90
 
Download MathType Crack Version 2025???
Download MathType Crack  Version 2025???Download MathType Crack  Version 2025???
Download MathType Crack Version 2025???
Google
 
Download 4k Video Downloader Crack Pre-Activated
Download 4k Video Downloader Crack Pre-ActivatedDownload 4k Video Downloader Crack Pre-Activated
Download 4k Video Downloader Crack Pre-Activated
Web Designer
 
How I solved production issues with OpenTelemetry
How I solved production issues with OpenTelemetryHow I solved production issues with OpenTelemetry
How I solved production issues with OpenTelemetry
Cees Bos
 
Ad

Fly High With Angular - How to build an app using Angular

  • 1. Fly High with Angular By Rajdeep Mandrekar & Wolfgang Furtado 
  • 3. Prerequisites ➔ Setting up the machine ◆ Install nvm (https://github.com/creationix/nvm#installation) ◆ Install node (nvm install v8.9.2) ◆ Install yarn (npm install -g yarn) ◆ Install angular-cli (npm install -g @angular/cli) ➔ Basic knowledge of HTML, CSS and JS 
  • 5. WhatisAngular? ➔ Angular is a TypeScript-based open-source front-end web application platform for dynamic web applications ➔ Created by the Angular Team at Google ➔ Provides a way to organize your HTML, JavaScript, and CSS to keep your front-end code clean.
  • 6. WhyAngular? ➔ Magical Two-Way data binding ➔ Routing Support ➔ Structured front end code ➔ Teach HTML new syntax with directives ➔ Huge community support
  • 8. 
  • 9. TypeScript ➔ Typescript is a typed superset of Javascript that compiles to plain Javascript ➔ It differentiates itself from competitors like CoffeeScript and Dart in that plain JavaScript code can be intermixed with TypeScript. Therefore JavaScript is TypeScript. ➔ JavaScript is TypeScript, but TypeScript is not JavaScript.
  • 10. TypeScript ➔ Optional static typing (the key here is optional) ➔ Type Inference, which gives some of the benefits of types, without actually using them ➔ Access to ES6 and ES7 features, before they become supported by major browsers ➔ The ability to compile down to a version of JavaScript that runs on all browsers ➔ Great tooling support with IntelliSense
  • 11. GeneratingAngularproject ➔ Use Angular CLI ➔ Why angular cli? ◆ Generates a clean project structure ◆ Auto compile code on save ◆ In-built server & compiler (error detection is fast) ◆ Manages all the npm dependencies
  • 12. GeneratingAngularproject > npm install -g @angular/cli > ng new fly-with-angular > cd fly-with-angular > ng serve
  • 16. 
  • 17. Whatisacomponent? ➔ Components are the building blocks of Angular applications. ➔ A component controls a patch of screen called a view. ➔ They easily nest one inside the other ➔ Each component may have its own: Class file, HTML file, CSS file
  • 19. Creatingacomponent > ng generate component trips-list
  • 22. Databinding Is automatic synchronization of data between the model and view components. ➔ One-way from data source to view target {{expression}} [target]="expression"
  • 23. ➔ One-way from view target to data source ➔ Two-way (event)="statement" [(target)]="expression"
  • 24. ➔ Property <img [src]="heroImageUrl"> <my-app [book]="currentBook"></my-app> <div [ngClass]="{'special': isSpecial}"></div>
  • 25. ➔ Event ➔ Attribute <button (click)="onSave()">Save</button> <img [attr.alt]="help" src="./..">
  • 26. ➔ Class ➔ Style ➔ Two-way (Banana in a box) <div [class.special]="isSpecial">Special</div> <button [style.color]="isSpecial ? 'red' : 'green'"> <input [(ngModel)]="name">
  • 30. Interface In simple words interfaces is a way of describing the shape of the JavaScript object. It helps us keep our programs error-free by providing information about the shape of the data we work with. Class: While class deals with the implementation.
  • 32. export interface Person { firstName: string; lastName: string; age: number; }
  • 34. Directives Directives is how we add dynamic behavior to HTML . There are 3 kinds of directive ➔ Components ◆ directives with a template ➔ Structural directives ◆ change the DOM layout by adding and removing DOM elements. ➔ Attribute directives ◆ change the appearance or behavior of an element, component, or another directive.
  • 35. Some most common used directives: ➔ ngIf => *ngIf="persons.length == 0" ➔ ngFor => *ngFor="let person of persons" ➔ ngSwitch/ngSwitchCase ➔ ngValue ➔ ngModel
  • 37. Pipes ➔ A pipe takes in data as input and transforms it to a desired output. ➔ Ex: DatePipe, UpperCasePipe, LowerCasePipe, CurrencyPipe, etc. {{‘abc’ | uppercase}} abc ABC
  • 39. EventBinding ➔ With event binding you can respond to any DOM event. ➔ To bind to a event binding, surround the DOM event name in parentheses and assign a quoted template statement to it. Eg. <button (click)="doAwesomeThing()">Click me!</button>
  • 40. Forms There are two ways to build forms: ➔ Reactive Forms ➔ Template-driven forms The two technologies belong to the @angular/forms library and share a common set of form control classes.
  • 41. ReactiveForms ➔ Angular reactive forms favors explicit management of the data flow between UI elements and server data. ➔ With reactive forms, you create a tree of Angular form control objects in the component class. ➔ Bind form controls to native form control elements in the component template.
  • 42. Template-drivenforms ➔ You place HTML form controls (such as <input> and <select>) in the component template and bind them to data model properties in the component, using directives like ngModel. ➔ You don't create Angular form control objects ➔ You don't push and pull data values. Angular handles that for you with ngModel ➔ Angular updates the mutable data model with user changes as they happen.
  • 43. Template-drivenvsReactiveForms ➔ Reactive forms does not mutate the data model whereas template-driven forms does. ➔ Reactive forms are synchronous. Template-driven forms are asynchronous. ➔ In template-driven forms you can't pass the validator in like you can for reactive forms. Instead, you need to add a directive to the template.
  • 45. <div class="form-group"> <label for="name">Name</label> <input type="text" class="form-control" id="name” [(ngModel)]="model.name" name="name"> </div>
  • 46. FormValidations Why validate forms? ➔ For accuracy and completeness. ➔ Form validation is required to prevent web form abuse by malicious users. ➔ Improper validation of form data is one of the main causes of security vulnerabilities. ➔ It exposes your website to attacks such as header injections, cross-site scripting, and SQL injections etc
  • 47. ValidateReactiveForms ➔ In a reactive form, the source of truth is the component class. ➔ Add validator functions directly to the form control model in the component class ➔ Angular then calls these functions whenever the value of the control changes.
  • 48. Built-inValidators ➔ min ➔ max ➔ required ➔ email ➔ minLength ➔ maxLength ➔ Pattern You can also create your custom validators and pass it to the form.

Editor's Notes

  • #4: (Why yarn? https://www.sitepoint.com/yarn-vs-npm)
  • #14: Need to show in vscode here