SlideShare a Scribd company logo
Presented by DEBBABI Nader
Introduction To
Angular 4
Training Sessions Organized by
Club Jeunes Ingénieurs ISAMM
ANGULAR
One framework.
Web, Mobile & Desktop.
Agenda
>What is Angular ?
>Motivation
>TypeScript ?
>Single Page Application (SPA)
>Development Environment Setup
>Hello World!
>Bootstrapping the app
>Building Blocks & Architecture
What is Angular ?
What is Angular ?
An Open-Source JavaScript
Framework, used to build Single
Page based Web Application (SPA),
Developed by Google,
Release date March 2017,
Current version 4.4.4 (stable).
Motivation
Motivation
> Speed & Performance,
> Smaller application,
> Modular application,
> Cross-platform Web, Mobile & Desktop,
> SPA,
> RESTful API,
> Uses TypeScript,
> Rxjs API Integration,
> & It has a huge community on GitHub.
TypeScript ?
TypeScript ?
Free & Open-Source programming
language,
Developed & maintained by Microsoft,
A superset of JavaScript,
Full Object-Oriented Programming with
features like classes, interfaces &
modules…
Support for ECMAScript 5 and uses arrow
function syntax,
Compiles to plain JavaScript.
Single Page Application
(SPA)
Single Page Application ?
One and Only HTML page for the entire application,
Dynamically update the single page with new data if needed, as
the user interacts with the app,
Show and Hide some components during the interaction process,
No reloading or refreshing during navigation,
More responsive & fluid app as a result,
Full separation between the presentation logic & business logic,
Asynchronous Requests (AJAX), JSON response & RESTful API.
Traditional way
Single Page Application
ANGULAR for Client Web App
ANGULAR for Client Web App
Development Environment
Setup
Development Environment Setup
Node.js is an open-source, cross-platform JavaScript run-time environment,
we use it to:
> Run a development server,
> Use the npm tool.
npm is a Node.js Package Manager for
JavaScript programming language,
npm is automatically installed with Nodejs,
Development Environment Setup
To develop the application using TypeScript
we need to install the TypeScript package
using the command,
Angular CLI (Command Line Interface) is a tool
that allows us to create a project, generate it’s
parts, build it and run it on the development
server directly through the command line,
Development Environment Setup
Visual Studio Code as
a Text Editor,
Hello World!!
Hello World!!
> Go to workspace directory,
> Using Angular CLI ng new command create the Hello World application,
> Go to the Hello World directory,
> Run the application using another Angular CLI command ng serve,
Basic Structure of
ANGULAR Application
Basic Structure of ANGULAR Application
.angular-cli.json , package.json
and tsconfig.json are the
responsible files on the project
configuration, it’s dependency
management and it’s external
packages.
Basic Structure of ANGULAR Application
main.ts and index.html are the
entry point to the application,
Since we are developing a SPA
index.html is the only HTML
page in the whole project,
style.css is the style sheet for
the global app design.
Basic Structure of ANGULAR Application
node_modules folder contains
the packages installed by the
npm tool,
app folder contains all the work,
components, modules…
Bootstrapping the app
Bootstrapping the app
Building Blocks
Building Blocks
Every Angular app has at least one Module, the
root module named AppModule,
An Angular app is a Modular app,
A module is a TypeScript class with the Decorator
@NgModule,
Each module in the application has it’s own
Components, Directives, Services… They should
be declared in @NgModule decorator,
Modules can cooperate to achieve some app
functionalities.
Building Blocks
A Component controls a piece of screen called
view,
This view is defined by the Template associated to
the Component,
A Component handles the user interaction with the
view (Template), passes data and properties to the
view and updates it dynamically,
A Component is a TypeScript class with the
Decorator @Component.
Building Blocks
A Component view is defined by its associated
Template,
A Template is bunch of HTML tags,
Along side with the HTML, a Template typically
contains some particular expressions and syntax
which belong to Angular,
A Template may contain some Custom Tags, that
represent another Component, the selectors.
Building Blocks
A Module, a Component, a Directive or a Service
are just TypeScript Classes until we tell Angular
about the difference between them, and that is
done by the Metadata,
We attach Metadata in TypeScript to a class by
using Decorators, @NgModule, @Component,
@Injectable…
Metadata tells Angular which Template belongs to
which Component and which Component belongs
to which Module…
Class + @Component + Metadata = A Component
Building Blocks
Building Blocks
A Directive is a TypeScript class with the Decorator
@Directive,
Directives appear within HTML tag as attributes,
Two kind of directives: Structural & Attribute
Directives,
Structural Directives change the layout by adding or
removing Template elements,
Example: *ngFor & *ngIf.
Attribute Directives change the appearance or the
behavior of an existing Template element,
Example: ngModel, ngStyle & ngClass.
Building Blocks
A Service is a TypeScript class with the Decorator
@Injectable,
A Service achieve some functionalities for the
application such us fetching data from server,
authentication…
This kind of functionalities should not be done in
the Component,
A Component should only take care of rendering
the Template (view).
Thanks for your attention !!

More Related Content

PDF
Developing a Demo Application with Angular 4 - J2I
PPTX
Angular 4 and TypeScript
PPTX
Dive into Angular, part 4: Angular 2.0
ODP
Angular 6 - The Complete Guide
PPSX
Angular 4 fronts
PPTX
Angular 2
PPTX
Angular 9
PDF
Developing a Demo Application with Angular 4 - J2I
Angular 4 and TypeScript
Dive into Angular, part 4: Angular 2.0
Angular 6 - The Complete Guide
Angular 4 fronts
Angular 2
Angular 9

What's hot (20)

PPTX
Introduction to angular 2
PDF
Angular 10 course_content
PPTX
PPTX
Angular tutorial
PPTX
Angular 4 Introduction Tutorial
PDF
Angular 2 - An Introduction
PDF
Mastering angular - Dot Net Tricks
PDF
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
PDF
Introduction to Angular 2
PDF
Introduction to angular 2
PDF
Beyond AngularJS: Best practices and more
PDF
What is Angular version 4?
PDF
AngularJS Vs Angular: Understanding the Differences
PPTX
Angular4 getting started
PDF
Quick introduction to Angular 4 for AngularJS 1.5 developers
PDF
Introduction to angular 4
PPTX
AngularJS: Service, factory & provider
PPTX
PPTX
Angular 2 - a New Hope
PPT
Angular App Presentation
Introduction to angular 2
Angular 10 course_content
Angular tutorial
Angular 4 Introduction Tutorial
Angular 2 - An Introduction
Mastering angular - Dot Net Tricks
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
Introduction to Angular 2
Introduction to angular 2
Beyond AngularJS: Best practices and more
What is Angular version 4?
AngularJS Vs Angular: Understanding the Differences
Angular4 getting started
Quick introduction to Angular 4 for AngularJS 1.5 developers
Introduction to angular 4
AngularJS: Service, factory & provider
Angular 2 - a New Hope
Angular App Presentation
Ad

Viewers also liked (7)

PDF
Angular 2 for Java Developers
PDF
Bootiful Development with Spring Boot and Angular - Connect.Tech 2017
PDF
Angular Seminar [한빛미디어 리얼타임 세미나]
PDF
The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017
PDF
The Role of Integration in Microservice Architecture (MSA)
PDF
Angular 4 for Java Developers
PPTX
AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017
Angular 2 for Java Developers
Bootiful Development with Spring Boot and Angular - Connect.Tech 2017
Angular Seminar [한빛미디어 리얼타임 세미나]
The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017
The Role of Integration in Microservice Architecture (MSA)
Angular 4 for Java Developers
AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017
Ad

Similar to Introduction To Angular 4 - J2I (20)

PPTX
Angular 5 presentation for beginners
PPTX
mobile development using node js and java
PPTX
Angular kickstart slideshare
PPTX
How Does Angular Work?
PPTX
PPTX
Angular interview questions
PDF
Integrating TypeScript with popular frameworks like React or Angular.pdf
PDF
quantum_leap_angularjs_tools_redefining_development_in_2023.pdf
PPTX
Angular Basics.pptx
PPTX
Angularjs2 presentation
PPTX
Angular IO
PPTX
Big Improvement_ New AngularJS Tools Changing How We Develop.pptx
PPTX
Angular Best Practices To Build Clean and Performant Web Applications
PPTX
Start your journey with angular | Basic Angular
PPTX
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
PDF
Big Improvement_ New AngularJS Tools Changing How We Develop.pdf
PPTX
Angular js
PDF
Evolution and History of Angular as Web Development Platform.pdf
PDF
Angular Interview Questions-PDF.pdf
PDF
AngularJS Vs ReactJS_ What’s The Difference_.pdf
Angular 5 presentation for beginners
mobile development using node js and java
Angular kickstart slideshare
How Does Angular Work?
Angular interview questions
Integrating TypeScript with popular frameworks like React or Angular.pdf
quantum_leap_angularjs_tools_redefining_development_in_2023.pdf
Angular Basics.pptx
Angularjs2 presentation
Angular IO
Big Improvement_ New AngularJS Tools Changing How We Develop.pptx
Angular Best Practices To Build Clean and Performant Web Applications
Start your journey with angular | Basic Angular
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
Big Improvement_ New AngularJS Tools Changing How We Develop.pdf
Angular js
Evolution and History of Angular as Web Development Platform.pdf
Angular Interview Questions-PDF.pdf
AngularJS Vs ReactJS_ What’s The Difference_.pdf

Recently uploaded (20)

PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPT
Teaching material agriculture food technology
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
KodekX | Application Modernization Development
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Modernizing your data center with Dell and AMD
PDF
Empathic Computing: Creating Shared Understanding
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
Understanding_Digital_Forensics_Presentation.pptx
Teaching material agriculture food technology
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
The AUB Centre for AI in Media Proposal.docx
Chapter 3 Spatial Domain Image Processing.pdf
NewMind AI Weekly Chronicles - August'25 Week I
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Reach Out and Touch Someone: Haptics and Empathic Computing
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
KodekX | Application Modernization Development
Big Data Technologies - Introduction.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Spectral efficient network and resource selection model in 5G networks
Building Integrated photovoltaic BIPV_UPV.pdf
Modernizing your data center with Dell and AMD
Empathic Computing: Creating Shared Understanding
Advanced methodologies resolving dimensionality complications for autism neur...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
20250228 LYD VKU AI Blended-Learning.pptx

Introduction To Angular 4 - J2I

  • 1. Presented by DEBBABI Nader Introduction To Angular 4 Training Sessions Organized by Club Jeunes Ingénieurs ISAMM
  • 3. Agenda >What is Angular ? >Motivation >TypeScript ? >Single Page Application (SPA) >Development Environment Setup >Hello World! >Bootstrapping the app >Building Blocks & Architecture
  • 5. What is Angular ? An Open-Source JavaScript Framework, used to build Single Page based Web Application (SPA), Developed by Google, Release date March 2017, Current version 4.4.4 (stable).
  • 7. Motivation > Speed & Performance, > Smaller application, > Modular application, > Cross-platform Web, Mobile & Desktop, > SPA, > RESTful API, > Uses TypeScript, > Rxjs API Integration, > & It has a huge community on GitHub.
  • 9. TypeScript ? Free & Open-Source programming language, Developed & maintained by Microsoft, A superset of JavaScript, Full Object-Oriented Programming with features like classes, interfaces & modules… Support for ECMAScript 5 and uses arrow function syntax, Compiles to plain JavaScript.
  • 11. Single Page Application ? One and Only HTML page for the entire application, Dynamically update the single page with new data if needed, as the user interacts with the app, Show and Hide some components during the interaction process, No reloading or refreshing during navigation, More responsive & fluid app as a result, Full separation between the presentation logic & business logic, Asynchronous Requests (AJAX), JSON response & RESTful API.
  • 17. Development Environment Setup Node.js is an open-source, cross-platform JavaScript run-time environment, we use it to: > Run a development server, > Use the npm tool. npm is a Node.js Package Manager for JavaScript programming language, npm is automatically installed with Nodejs,
  • 18. Development Environment Setup To develop the application using TypeScript we need to install the TypeScript package using the command, Angular CLI (Command Line Interface) is a tool that allows us to create a project, generate it’s parts, build it and run it on the development server directly through the command line,
  • 19. Development Environment Setup Visual Studio Code as a Text Editor,
  • 21. Hello World!! > Go to workspace directory, > Using Angular CLI ng new command create the Hello World application, > Go to the Hello World directory, > Run the application using another Angular CLI command ng serve,
  • 23. Basic Structure of ANGULAR Application .angular-cli.json , package.json and tsconfig.json are the responsible files on the project configuration, it’s dependency management and it’s external packages.
  • 24. Basic Structure of ANGULAR Application main.ts and index.html are the entry point to the application, Since we are developing a SPA index.html is the only HTML page in the whole project, style.css is the style sheet for the global app design.
  • 25. Basic Structure of ANGULAR Application node_modules folder contains the packages installed by the npm tool, app folder contains all the work, components, modules…
  • 29. Building Blocks Every Angular app has at least one Module, the root module named AppModule, An Angular app is a Modular app, A module is a TypeScript class with the Decorator @NgModule, Each module in the application has it’s own Components, Directives, Services… They should be declared in @NgModule decorator, Modules can cooperate to achieve some app functionalities.
  • 30. Building Blocks A Component controls a piece of screen called view, This view is defined by the Template associated to the Component, A Component handles the user interaction with the view (Template), passes data and properties to the view and updates it dynamically, A Component is a TypeScript class with the Decorator @Component.
  • 31. Building Blocks A Component view is defined by its associated Template, A Template is bunch of HTML tags, Along side with the HTML, a Template typically contains some particular expressions and syntax which belong to Angular, A Template may contain some Custom Tags, that represent another Component, the selectors.
  • 32. Building Blocks A Module, a Component, a Directive or a Service are just TypeScript Classes until we tell Angular about the difference between them, and that is done by the Metadata, We attach Metadata in TypeScript to a class by using Decorators, @NgModule, @Component, @Injectable… Metadata tells Angular which Template belongs to which Component and which Component belongs to which Module… Class + @Component + Metadata = A Component
  • 34. Building Blocks A Directive is a TypeScript class with the Decorator @Directive, Directives appear within HTML tag as attributes, Two kind of directives: Structural & Attribute Directives, Structural Directives change the layout by adding or removing Template elements, Example: *ngFor & *ngIf. Attribute Directives change the appearance or the behavior of an existing Template element, Example: ngModel, ngStyle & ngClass.
  • 35. Building Blocks A Service is a TypeScript class with the Decorator @Injectable, A Service achieve some functionalities for the application such us fetching data from server, authentication… This kind of functionalities should not be done in the Component, A Component should only take care of rendering the Template (view).
  • 36. Thanks for your attention !!