SlideShare a Scribd company logo
http://angularjs.org
(AngularJS Basic)
AngularJS:
•Is a client-side MVC JavaScript framework for writing single page
web applications(SPA).
•It's built and mantained by Google.
•Help us building testable web applications that scale.
•It lets you use HTML as your template language and lets you
extend HTML's syntax to express your application's components
clearly and succinctly.
•The unique and innovative features are two-way-data bindings,
dependency injection, easy-to-test code and extending the HTML
dialect by using directives.
Single Page Applications (SPA)
•In a Single Page Application (SPA), either all necessary code (HTML,
CSS, JavaScript) is retrieved with a single page load.
•Appropiate resources are dynamically loaded and added to the page
as necessary, ussually in response to user actions.
•The page does not reload at any point in the process.
•Interaction with the single page application often involves dynamic
communication with the web server behind the scenes.
•SPAs are backe-end independent, and we only care about the JSON
data coming back, be it from JAVA, .NET, PHP or any other server-side
language.
Some key features of the Angular JS in web
development:
•Two way data binding
•MVC framework
•Templating
•Custom-directive (reusable components)
•REST-friendly
•Set up a link for any dynamic page
•Form Validation
•Server Comunication
•Localization
•Dependency injection
•Full testing environment
•AngularJS can do everything that jQuery does and much more,
yet is roughly equivalent in download size
AngularJS vs jQuery
jQuery AngularJS
Restful API NO YES
Integration test runner NO YES
MVC support NO YES
Template NO YES
Two way data binding NO YES
Dependency injection NO YES
AJAX YES YES
Cross Module Communication YES YES
Unit test runner YES YES
Form validation NO YES
Localization NO YES
File size 86.7 kb 167.1 kb
Main components of AngularJS:
•Directives - AngularJS directives are extended HTML attributes
with the prefix ng-
•Modules - Where our application components live
•Controllers - Where we add application behavior & logics of our
application.
•Expressions - How values get displayed within the page
Modules
•We can think of a module as a container for the different parts
of your app – controllers, services, filters, directives, etc.
•A container for different parts of application
•Modules can have other modules as dependencies
Getting started
Creating a module
Controllers
•An Angular Controller allows us to interact with a View and
Model, it's the place where presentational logic can take place to
keep the UI bindings in sync with the Model.
Dependency injection
When MyController is created by AngularJS, the $scope and instances
of dep1 and dep2 are automatically passed in. This eliminates the need
for hard-coding dependencies with global variables or creating instances
manually within the component, which greatly complicates and limits
testability.
Expressions
•Allow you to insert dynamic values into your HTML.
•AngularJS expressions are written inside double braces: {{expression}}
•Binds data to HTML the same way as the ng-bind directive, and output
the data exactly were the directive is written.
•They are used for small calculations only or getting the value of $scope
properties.
$scope
•Every controller has an associated $scope object.
•$scope is an object that refers to the application model
•In the Model-View-Controller structure, the $scope object
becomes the model.
•We only use $scope inside Controllers, where we bind data
from the Controller to the View.
Views
Directives
AngularJS extends HTML through use of directives, a feature that
allows you to create your own HTML elements.
- ng-app directive initializes an AngularJS application.
- ng-init directive initializes application data.
- ng-click directive allows you to specify custom behavior when an
element is clicked
Using directives
_
Custom Directives
Using filters
• A filter formats the value of an expression for display to the
user. They can be used in view templates, controllers or services
and it is easy to define your own filter.
Two-way Data Binding
•Data-binding is an automatic way of updating the view
whenever the model changes, as well as updating the model
whenever the view changes.
AngularJS form validation
•There are many form validation directives available in AngularJS:
Creating templates
$http Service
The $http service is a core Angular service that facilitates
communication with the remote HTTP servers via the browser's
XMLHttpRequest object or via JSONP.
Custom services
•We can define our own custom services in AngularJS apps and
use them wherever required.
•There are several ways to declare AngularJS service within
application. Following are two simple ways:
The Role of Factories
AngularJS routing
•Since we are making a single page application and we don’t
want any page refreshes, we’ll use Angular’s routing capabilities.
Defining routes
Pain Points
•Angular Expressions are used extensively in the View layer of
Angular.
•It lets the developer use complicated logic and even perform
assignment operations and calculations, all inside the view
templates
•Putting logic inside the templates makes it harder to test,
sometimes impossible to test.
Summary
•AngularJS provides a robust “SPA” framework for bulding robust client-
side applications.
Key features:
•Directives and filters
•Two-way data binding
•Views, Controllers, Scope
•Modules and Routes
Resources
•http://angularjs.org
•http://builtwith.angularjs.org
•http://angular-ui.github.io
•http://mgcrea.github.io/angular-strap
•http://pluralsight.com

More Related Content

What's hot

Introduction to AngularJs
Introduction to AngularJsIntroduction to AngularJs
Introduction to AngularJs
murtazahaveliwala
 
Introduction to single page application with angular js
Introduction to single page application with angular jsIntroduction to single page application with angular js
Introduction to single page application with angular js
Mindfire Solutions
 
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
 
Overview about AngularJS Framework
Overview about AngularJS Framework Overview about AngularJS Framework
Overview about AngularJS Framework
Camilo Lopes
 
Introduction to SPA with AngularJS
Introduction to SPA with AngularJSIntroduction to SPA with AngularJS
Introduction to SPA with AngularJS
Riki Pribadi
 
ANGULAR JS TRAINING IN PUNE
ANGULAR JS TRAINING IN PUNEANGULAR JS TRAINING IN PUNE
ANGULAR JS TRAINING IN PUNE
cncwebworld
 
AngularJS
AngularJSAngularJS
AngularJS
Malin De Silva
 
AngularJS
AngularJSAngularJS
AngularJS
Mahmoud Tolba
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
Aldo Pizzagalli
 
Angularjs
AngularjsAngularjs
Angularjs
Sabin Tamrakar
 
AngularJS - Architecture decisions in a large project 
AngularJS - Architecture decisionsin a large project AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisions in a large project 
Elad Hirsch
 
AngularJS One Day Workshop
AngularJS One Day WorkshopAngularJS One Day Workshop
AngularJS One Day Workshop
Shyam Seshadri
 
Introduction to Angular js 2.0
Introduction to Angular js 2.0Introduction to Angular js 2.0
Introduction to Angular js 2.0
Nagaraju Sangam
 
Angular js presentation at Datacom
Angular js presentation at DatacomAngular js presentation at Datacom
Angular js presentation at DatacomDavid Xi Peng Yang
 
Angular JS Indtrodution
Angular JS IndtrodutionAngular JS Indtrodution
Angular JS Indtrodution
adesh21
 
Introduction to Angular JS
Introduction to Angular JSIntroduction to Angular JS
Introduction to Angular JS
Santhosh Kumar Srinivasan
 
Coffee@DBG - Exploring Angular JS
Coffee@DBG - Exploring Angular JSCoffee@DBG - Exploring Angular JS
Coffee@DBG - Exploring Angular JS
Deepu S Nath
 
AngularJS Best Practices
AngularJS Best PracticesAngularJS Best Practices
AngularJS Best Practices
Betclic Everest Group Tech Team
 

What's hot (20)

Introduction to AngularJs
Introduction to AngularJsIntroduction to AngularJs
Introduction to AngularJs
 
Introduction to single page application with angular js
Introduction to single page application with angular jsIntroduction to single page application with angular js
Introduction to single page application with angular js
 
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
 
Angular js
Angular jsAngular js
Angular js
 
Overview about AngularJS Framework
Overview about AngularJS Framework Overview about AngularJS Framework
Overview about AngularJS Framework
 
Introduction to SPA with AngularJS
Introduction to SPA with AngularJSIntroduction to SPA with AngularJS
Introduction to SPA with AngularJS
 
ANGULAR JS TRAINING IN PUNE
ANGULAR JS TRAINING IN PUNEANGULAR JS TRAINING IN PUNE
ANGULAR JS TRAINING IN PUNE
 
AngularJS
AngularJSAngularJS
AngularJS
 
AngularJS
AngularJSAngularJS
AngularJS
 
Spa with angular
Spa with angularSpa with angular
Spa with angular
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Angularjs
AngularjsAngularjs
Angularjs
 
AngularJS - Architecture decisions in a large project 
AngularJS - Architecture decisionsin a large project AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisions in a large project 
 
AngularJS One Day Workshop
AngularJS One Day WorkshopAngularJS One Day Workshop
AngularJS One Day Workshop
 
Introduction to Angular js 2.0
Introduction to Angular js 2.0Introduction to Angular js 2.0
Introduction to Angular js 2.0
 
Angular js presentation at Datacom
Angular js presentation at DatacomAngular js presentation at Datacom
Angular js presentation at Datacom
 
Angular JS Indtrodution
Angular JS IndtrodutionAngular JS Indtrodution
Angular JS Indtrodution
 
Introduction to Angular JS
Introduction to Angular JSIntroduction to Angular JS
Introduction to Angular JS
 
Coffee@DBG - Exploring Angular JS
Coffee@DBG - Exploring Angular JSCoffee@DBG - Exploring Angular JS
Coffee@DBG - Exploring Angular JS
 
AngularJS Best Practices
AngularJS Best PracticesAngularJS Best Practices
AngularJS Best Practices
 

Viewers also liked

A Very Public and Overdue Funeral for jQuery
A Very Public and Overdue Funeral for jQueryA Very Public and Overdue Funeral for jQuery
A Very Public and Overdue Funeral for jQuery
FITC
 
Pemrograman Web 6 - jQuery
Pemrograman Web 6 - jQueryPemrograman Web 6 - jQuery
Pemrograman Web 6 - jQuery
Nur Fadli Utomo
 
AngularJS vs jQuery
AngularJS vs jQueryAngularJS vs jQuery
AngularJS vs jQuery
PayPal
 
Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01
Arunangsu Sahu
 
Jquery
JqueryJquery
Intro to AngularJS
Intro to AngularJS Intro to AngularJS
Intro to AngularJS
Sparkhound Inc.
 
Just Do it with jQuery
Just Do it with jQueryJust Do it with jQuery
Just Do it with jQuery
selfteachme
 

Viewers also liked (7)

A Very Public and Overdue Funeral for jQuery
A Very Public and Overdue Funeral for jQueryA Very Public and Overdue Funeral for jQuery
A Very Public and Overdue Funeral for jQuery
 
Pemrograman Web 6 - jQuery
Pemrograman Web 6 - jQueryPemrograman Web 6 - jQuery
Pemrograman Web 6 - jQuery
 
AngularJS vs jQuery
AngularJS vs jQueryAngularJS vs jQuery
AngularJS vs jQuery
 
Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01
 
Jquery
JqueryJquery
Jquery
 
Intro to AngularJS
Intro to AngularJS Intro to AngularJS
Intro to AngularJS
 
Just Do it with jQuery
Just Do it with jQueryJust Do it with jQuery
Just Do it with jQuery
 

Similar to Angularjs basic part01

AngularJs (1.x) Presentation
AngularJs (1.x) PresentationAngularJs (1.x) Presentation
AngularJs (1.x) Presentation
Raghubir Singh
 
Angular js 1.3 basic tutorial
Angular js 1.3 basic tutorialAngular js 1.3 basic tutorial
Angular js 1.3 basic tutorial
Al-Mutaz Bellah Salahat
 
Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to Angularjs
Gaurav Agrawal
 
Angular patterns
Angular patternsAngular patterns
Angular patterns
Premkumar M
 
Ajs ppt
Ajs pptAjs ppt
Angularjs overview
Angularjs  overviewAngularjs  overview
Angularjs overview
VickyCmd
 
Itroducing Angular JS
Itroducing Angular JSItroducing Angular JS
Itroducing Angular JS
Carlos Emanuel Mathiasen
 
Anjular js
Anjular jsAnjular js
Anjular js
Naga Dinesh
 
The A1 "AngularJS 1 Kick Start"
The A1 "AngularJS 1 Kick Start"The A1 "AngularJS 1 Kick Start"
The A1 "AngularJS 1 Kick Start"
Christian John Felix
 
The A1 by Christian John Felix
The A1 by Christian John FelixThe A1 by Christian John Felix
The A1 by Christian John Felix
DEVCON
 
What are the key distinctions between Angular and AngularJS?
What are the key distinctions between Angular and AngularJS?What are the key distinctions between Angular and AngularJS?
What are the key distinctions between Angular and AngularJS?
Albiorix Technology
 
Angular 6 Training with project in hyderabad india
Angular 6 Training with project in hyderabad indiaAngular 6 Training with project in hyderabad india
Angular 6 Training with project in hyderabad india
php2ranjan
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
Shyjal Raazi
 
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
Edureka!
 
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptxangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
sarah david
 
A perfect choice for web apps
A perfect choice for web apps A perfect choice for web apps
A perfect choice for web apps
adhyathakkar10
 
Angular js up & running
Angular js up & runningAngular js up & running
Angular js up & running
Junaid Baloch
 
Introduction to Angular Js
Introduction to Angular JsIntroduction to Angular Js
Introduction to Angular Js
Professional Guru
 
Angular JS training institute in Jaipur
           Angular JS training institute in Jaipur           Angular JS training institute in Jaipur
Angular JS training institute in Jaipur
HEMANT SAXENA
 
Angular js for Beginnners
Angular js for BeginnnersAngular js for Beginnners
Angular js for Beginnners
Santosh Kumar Kar
 

Similar to Angularjs basic part01 (20)

AngularJs (1.x) Presentation
AngularJs (1.x) PresentationAngularJs (1.x) Presentation
AngularJs (1.x) Presentation
 
Angular js 1.3 basic tutorial
Angular js 1.3 basic tutorialAngular js 1.3 basic tutorial
Angular js 1.3 basic tutorial
 
Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to Angularjs
 
Angular patterns
Angular patternsAngular patterns
Angular patterns
 
Ajs ppt
Ajs pptAjs ppt
Ajs ppt
 
Angularjs overview
Angularjs  overviewAngularjs  overview
Angularjs overview
 
Itroducing Angular JS
Itroducing Angular JSItroducing Angular JS
Itroducing Angular JS
 
Anjular js
Anjular jsAnjular js
Anjular js
 
The A1 "AngularJS 1 Kick Start"
The A1 "AngularJS 1 Kick Start"The A1 "AngularJS 1 Kick Start"
The A1 "AngularJS 1 Kick Start"
 
The A1 by Christian John Felix
The A1 by Christian John FelixThe A1 by Christian John Felix
The A1 by Christian John Felix
 
What are the key distinctions between Angular and AngularJS?
What are the key distinctions between Angular and AngularJS?What are the key distinctions between Angular and AngularJS?
What are the key distinctions between Angular and AngularJS?
 
Angular 6 Training with project in hyderabad india
Angular 6 Training with project in hyderabad indiaAngular 6 Training with project in hyderabad india
Angular 6 Training with project in hyderabad india
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
 
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptxangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
 
A perfect choice for web apps
A perfect choice for web apps A perfect choice for web apps
A perfect choice for web apps
 
Angular js up & running
Angular js up & runningAngular js up & running
Angular js up & running
 
Introduction to Angular Js
Introduction to Angular JsIntroduction to Angular Js
Introduction to Angular Js
 
Angular JS training institute in Jaipur
           Angular JS training institute in Jaipur           Angular JS training institute in Jaipur
Angular JS training institute in Jaipur
 
Angular js for Beginnners
Angular js for BeginnnersAngular js for Beginnners
Angular js for Beginnners
 

Recently uploaded

CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
GeoBlogs
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 

Recently uploaded (20)

CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 

Angularjs basic part01

  • 2. AngularJS: •Is a client-side MVC JavaScript framework for writing single page web applications(SPA). •It's built and mantained by Google. •Help us building testable web applications that scale. •It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly and succinctly. •The unique and innovative features are two-way-data bindings, dependency injection, easy-to-test code and extending the HTML dialect by using directives.
  • 3. Single Page Applications (SPA) •In a Single Page Application (SPA), either all necessary code (HTML, CSS, JavaScript) is retrieved with a single page load. •Appropiate resources are dynamically loaded and added to the page as necessary, ussually in response to user actions. •The page does not reload at any point in the process. •Interaction with the single page application often involves dynamic communication with the web server behind the scenes. •SPAs are backe-end independent, and we only care about the JSON data coming back, be it from JAVA, .NET, PHP or any other server-side language.
  • 4. Some key features of the Angular JS in web development: •Two way data binding •MVC framework •Templating •Custom-directive (reusable components) •REST-friendly •Set up a link for any dynamic page •Form Validation •Server Comunication •Localization •Dependency injection •Full testing environment •AngularJS can do everything that jQuery does and much more, yet is roughly equivalent in download size
  • 5. AngularJS vs jQuery jQuery AngularJS Restful API NO YES Integration test runner NO YES MVC support NO YES Template NO YES Two way data binding NO YES Dependency injection NO YES AJAX YES YES Cross Module Communication YES YES Unit test runner YES YES Form validation NO YES Localization NO YES File size 86.7 kb 167.1 kb
  • 6. Main components of AngularJS: •Directives - AngularJS directives are extended HTML attributes with the prefix ng- •Modules - Where our application components live •Controllers - Where we add application behavior & logics of our application. •Expressions - How values get displayed within the page
  • 7. Modules •We can think of a module as a container for the different parts of your app – controllers, services, filters, directives, etc. •A container for different parts of application •Modules can have other modules as dependencies
  • 10. Controllers •An Angular Controller allows us to interact with a View and Model, it's the place where presentational logic can take place to keep the UI bindings in sync with the Model.
  • 11. Dependency injection When MyController is created by AngularJS, the $scope and instances of dep1 and dep2 are automatically passed in. This eliminates the need for hard-coding dependencies with global variables or creating instances manually within the component, which greatly complicates and limits testability.
  • 12. Expressions •Allow you to insert dynamic values into your HTML. •AngularJS expressions are written inside double braces: {{expression}} •Binds data to HTML the same way as the ng-bind directive, and output the data exactly were the directive is written. •They are used for small calculations only or getting the value of $scope properties.
  • 13. $scope •Every controller has an associated $scope object. •$scope is an object that refers to the application model •In the Model-View-Controller structure, the $scope object becomes the model. •We only use $scope inside Controllers, where we bind data from the Controller to the View.
  • 14. Views
  • 15. Directives AngularJS extends HTML through use of directives, a feature that allows you to create your own HTML elements. - ng-app directive initializes an AngularJS application. - ng-init directive initializes application data. - ng-click directive allows you to specify custom behavior when an element is clicked
  • 18. Using filters • A filter formats the value of an expression for display to the user. They can be used in view templates, controllers or services and it is easy to define your own filter.
  • 19. Two-way Data Binding •Data-binding is an automatic way of updating the view whenever the model changes, as well as updating the model whenever the view changes.
  • 20. AngularJS form validation •There are many form validation directives available in AngularJS:
  • 22. $http Service The $http service is a core Angular service that facilitates communication with the remote HTTP servers via the browser's XMLHttpRequest object or via JSONP.
  • 23. Custom services •We can define our own custom services in AngularJS apps and use them wherever required. •There are several ways to declare AngularJS service within application. Following are two simple ways:
  • 24. The Role of Factories
  • 25. AngularJS routing •Since we are making a single page application and we don’t want any page refreshes, we’ll use Angular’s routing capabilities.
  • 27. Pain Points •Angular Expressions are used extensively in the View layer of Angular. •It lets the developer use complicated logic and even perform assignment operations and calculations, all inside the view templates •Putting logic inside the templates makes it harder to test, sometimes impossible to test.
  • 28. Summary •AngularJS provides a robust “SPA” framework for bulding robust client- side applications. Key features: •Directives and filters •Two-way data binding •Views, Controllers, Scope •Modules and Routes

Editor's Notes

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30