SlideShare a Scribd company logo
Getting Started With
Getting Started With
Ref: OICS/TR/PPT/101
Presentation By,
Presentation by,
Mr.Manoj Mohan
OrisysIndia Consultancy Services,Technopark
Introduction
AngularJS is an open source web application framework. It was originally developed in 2009 by
Misko Hevery and Adam Abrons. It is now maintained by Google. Its latest version is 1.4.4 .
Defenition :
"AngularJS is a structural framework for dynamic web apps. 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. Angular's data binding and dependency injection eliminate much of the
code you currently have to write. And it all happens within the browser, making it an ideal partner
with any server technology".
Features
● AngularJS is a powerful JavaScript based development framework to create RICH Internet
Application(RIA).
● AngulajJS provides developers options to write client side application (using JavaScript) in a
clean MVC(Model View Controller) way.
● Application written in AngularJS is cross-browser compliant. AngularJS automatically
handles javascript code suitable for each browser.
● AngularJS is open source, completely free, and used by thousands of developers around the
world. It is licensed under the Apache License version 2.0.
● Overall, AngularJS is a framework to build large scale and high performance web appliation
while keeping them as easy-to-maintain.
Why angular JS ?
●Defines numerous ways to organize web application at client side.
●Enhances HTML by attaching directives, custom tags, attributes, expressions, templates within
HTML.
●Encourage TDD
●Encourage MVC/MVVM design pattern
●Code Reuse
●Good for Single Page Apps (SPA)
Core Features
Expression
Angular JS
Modules
Controllers
Directives
Validators
Providers
Data Binding
Factories
Services
Filters
Dependency Injection
Scope
Architecture
Event
Controller
View
Model
Application
Before we start with creating actual HelloWorld application using AngularJS, let us see
what are the actual parts of a AngularJS application. An AngularJS application consists
of following three important parts
ng-app : This directive defines and links an AngularJS application to HTML.
ng-model : This directive binds the values of AngularJS application data to HTML input
controls.
ng-bind : This directive bidns the AngularJS Application data to HTML tags.
Test App
<html>
<title>AngularJS First Application</title>
<body>
<h1>Sample Application</h1>
<div ng-app="">
<p>Enter your Name: <input type="text" ng-model="name"></p>
<p>Hello <span ng-bind="name"></span>!</p>
</div>
<script
src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.m
in.js"></script>
</body>
</html>
AngularJS Directives
AngularJS directives are used to extend HTML. These are special attributes starting with ng-
prefix. We're going to discuss following directives:
ng-app - This directive starts an AngularJS Application.
ng-init - This directive initializes application data.
ng-model - This directive defines the model that is variable to be used in AngularJS.
ng-repeat - This directive repeats html elements for each item in a collection.
AngularJS Controllers
<html>
<head>
<title>Angular JS Controller</title>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
</head>
<body>
<h2>AngularJS Sample Application</h2>
<div ng-app="mainApp" ng-controller="studentController">
Enter first name: <input type="text" ng-model="student.firstName"><br><br>
Enter last name: <input type="text" ng-model="student.lastName"><br>
<br>
You are entering: {{student.fullName()}}
</div>
AngularJS Controllers
<script>
var mainApp = angular.module("mainApp", []);
mainApp.controller('studentController', function($scope) {
$scope.student = {
firstName: "Mahesh",
lastName: "Parashar",
fullName: function() {
var studentObject;
studentObject = $scope.student;
return studentObject.firstName + " " + studentObject.lastName;
}
};
});
</script>
Ajax test code
<html>
<head>
<title>Angular JS Includes</title>
</head>
<body>
<h2>AngularJS Sample Application</h2>
<div ng-app="" ng-controller="studentController">
<table>
<tr ng-repeat="student in students">
<td>{{ student.Name }}</td>
<td>{{ student.RollNo }}</td>
<td>{{ student.Percentage }}</td>
</tr>
</table>
<script>
function studentController($scope,$http) {
var url="data.txt";
$http.get(url).success( function(response) {
$scope.students = response;
});
}
</script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.min.js"></script>
</body>
</html>
Hello JQuery
<p id="greeting2"></p>
<script>
$(function(){
$('#greeting2').text('Hello World!');
});
</script>
Hello AngularJS
<p ng:init="greeting = 'Hello World!'">{{greeting}}</p>
Html Dom
1 ng-disabled disables a given control.
2 ng-show shows a given control.
3 ng-hide hides a given control.
4 ng-click represents a AngularJS click event.
Advanced AngularJS Concept
•Dependency Injection
•Modularity
•Digesting
•Scope
•Handling SEO
•End to End Testing
•Promises
•Localization
•Filters
Services
This service is used to display toast message for every action.
Sample Code:-
mainApp.service('getToast', ['$mdToast', '$animate', function($mdToast,
$animate) {
this.messageBox = function(msg, type) {
var box = $mdToast.show(
$mdToast.simple()
.textContent(msg)
.position('top right')
.theme(type)
.hideDelay(2000)
);
return box;
}
}]);
Factory
This factory is used to list users which is saved as json file.
Sample Code
mainApp.factory('myAppFactory', function($http) {
return {
getData: function() {
return $http({
method: 'GET',
url: 'json/userlist.json'
});
}
}
})
Dis-advantage
Angular is not the silver bullet. Some of its disadvantages are backsides of its strong points, some
are inherent to the JavaScript ineffectiveness that could not be overcome even with the best
derivatives.
The weaknesses are:
● Angular is big and complicated. With multiple ways to do the same thing it is hard to tell which
way is better for particular task. Mastering Angular over the “Hello world” level requires
considerable efforts. Different developers’ coding styles and habits might complicate integration of
different components into a whole solution.
●The lifecycle of Angular application is complex, and to master it you really need to read the code.
Compile and link are not intuitive, and specific cases can be confusing (recursion in compile,
collisions between directives etc.).
●As the project grows with time, you most likely will need to throw away existing implementations
and create new versions using different approaches. Angular implementations scale poorly.
●More than 2000 watchers can severely lag the UI. That limits the complexity of your Angular
forms, especially big data grids and lists.
jQuery & AngularJS
Basement (-2), Thejaswini Building
Technopark, Kerala 695 581, India
www.orisys.in
Email: contact@orisys.in ,
Office (Technopark) :+91-9946 014 345
Office (Sasthamangalam) :+91-8086 800 203

More Related Content

PDF
Angular js
PPTX
Angular tutorial
PDF
PDF
AngularJS Best Practices
PPTX
Introduction to AngularJS
PDF
Introduction to Unit Tests and TDD
PPTX
Introduction to Angularjs
Angular js
Angular tutorial
AngularJS Best Practices
Introduction to AngularJS
Introduction to Unit Tests and TDD
Introduction to Angularjs

What's hot (20)

PPTX
AngularJS Best Practices
PPTX
Angularjs PPT
PDF
Angular from Scratch
PPTX
Introduction to Angular js 2.0
PDF
AngularJS introduction
PPTX
Angular js PPT
PPTX
AngularJs presentation
PPTX
Introduction to AngularJS Framework
PPTX
Intoduction to Angularjs
PDF
AngularJS 101 - Everything you need to know to get started
PPTX
PDF
Overview of the AngularJS framework
PDF
Introduction to AngularJS
PDF
AngularJS Project Setup step-by- step guide - RapidValue Solutions
PPTX
AngularJS One Day Workshop
PPTX
Front end development with Angular JS
PPT
Angular 8
PPTX
Angular js
PPTX
AngularJS intro
PDF
AngularJS - Services
AngularJS Best Practices
Angularjs PPT
Angular from Scratch
Introduction to Angular js 2.0
AngularJS introduction
Angular js PPT
AngularJs presentation
Introduction to AngularJS Framework
Intoduction to Angularjs
AngularJS 101 - Everything you need to know to get started
Overview of the AngularJS framework
Introduction to AngularJS
AngularJS Project Setup step-by- step guide - RapidValue Solutions
AngularJS One Day Workshop
Front end development with Angular JS
Angular 8
Angular js
AngularJS intro
AngularJS - Services
Ad

Viewers also liked (15)

PDF
Dossier de Presse ENDOCONTROL 2015-2016
PPTX
Modul 3, oppgave 1 sebastian mikalsen
PPTX
Functies ict
PPTX
challotte's 12 story tree howse
PDF
Hot diptpc9
PDF
Transformation of The Theater
PPT
Nature wise power point
PPTX
Катафорезное покрытие для насосов KV и KVC/KVCX
PPTX
Вопросы соискателя на интервью
PPS
Love is
PPTX
Modul 3
DOCX
questionnaire analysis
PPS
+El hijo mensaje_
PPTX
Anders dan anderen krant uitleg (1)
PDF
Duffel Terra: Never Yield by Humberto Belli - #BHMASLife
Dossier de Presse ENDOCONTROL 2015-2016
Modul 3, oppgave 1 sebastian mikalsen
Functies ict
challotte's 12 story tree howse
Hot diptpc9
Transformation of The Theater
Nature wise power point
Катафорезное покрытие для насосов KV и KVC/KVCX
Вопросы соискателя на интервью
Love is
Modul 3
questionnaire analysis
+El hijo mensaje_
Anders dan anderen krant uitleg (1)
Duffel Terra: Never Yield by Humberto Belli - #BHMASLife
Ad

Similar to The Basics Angular JS (20)

PPTX
Angular Javascript Tutorial with command
PPTX
Training On Angular Js
PPTX
Angular Js Get Started - Complete Course
PDF
AngularJS By Vipin
PPTX
Angular js slides
PDF
Angular js interview question answer for fresher
PDF
Introduction to AngularJS By Bharat Makwana
PDF
AngularJS Basics
PPTX
Mean stack Magics
PPTX
Angular JS training institute in Jaipur
PDF
Workshop 12: AngularJS Parte I
DOCX
ANGULAR JS LAB MANUAL(final) vtu2021 sch
PDF
Introduction to Angular Js
PPTX
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
PPTX
Angular workshop - Full Development Guide
PDF
Angular Project Report
PPT
introduction to Angularjs basics
PPTX
AngularJS 1.x training
DOCX
angularjs_tutorial.docx
Angular Javascript Tutorial with command
Training On Angular Js
Angular Js Get Started - Complete Course
AngularJS By Vipin
Angular js slides
Angular js interview question answer for fresher
Introduction to AngularJS By Bharat Makwana
AngularJS Basics
Mean stack Magics
Angular JS training institute in Jaipur
Workshop 12: AngularJS Parte I
ANGULAR JS LAB MANUAL(final) vtu2021 sch
Introduction to Angular Js
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
Angular workshop - Full Development Guide
Angular Project Report
introduction to Angularjs basics
AngularJS 1.x training
angularjs_tutorial.docx

Recently uploaded (20)

PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Modernizing your data center with Dell and AMD
PDF
cuic standard and advanced reporting.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Approach and Philosophy of On baking technology
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
KodekX | Application Modernization Development
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Network Security Unit 5.pdf for BCA BBA.
Modernizing your data center with Dell and AMD
cuic standard and advanced reporting.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Approach and Philosophy of On baking technology
“AI and Expert System Decision Support & Business Intelligence Systems”
Mobile App Security Testing_ A Comprehensive Guide.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Spectral efficient network and resource selection model in 5G networks
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Encapsulation_ Review paper, used for researhc scholars
KodekX | Application Modernization Development

The Basics Angular JS

  • 1. Getting Started With Getting Started With Ref: OICS/TR/PPT/101
  • 2. Presentation By, Presentation by, Mr.Manoj Mohan OrisysIndia Consultancy Services,Technopark
  • 3. Introduction AngularJS is an open source web application framework. It was originally developed in 2009 by Misko Hevery and Adam Abrons. It is now maintained by Google. Its latest version is 1.4.4 . Defenition : "AngularJS is a structural framework for dynamic web apps. 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. Angular's data binding and dependency injection eliminate much of the code you currently have to write. And it all happens within the browser, making it an ideal partner with any server technology".
  • 4. Features ● AngularJS is a powerful JavaScript based development framework to create RICH Internet Application(RIA). ● AngulajJS provides developers options to write client side application (using JavaScript) in a clean MVC(Model View Controller) way. ● Application written in AngularJS is cross-browser compliant. AngularJS automatically handles javascript code suitable for each browser. ● AngularJS is open source, completely free, and used by thousands of developers around the world. It is licensed under the Apache License version 2.0. ● Overall, AngularJS is a framework to build large scale and high performance web appliation while keeping them as easy-to-maintain.
  • 5. Why angular JS ? ●Defines numerous ways to organize web application at client side. ●Enhances HTML by attaching directives, custom tags, attributes, expressions, templates within HTML. ●Encourage TDD ●Encourage MVC/MVVM design pattern ●Code Reuse ●Good for Single Page Apps (SPA)
  • 6. Core Features Expression Angular JS Modules Controllers Directives Validators Providers Data Binding Factories Services Filters Dependency Injection Scope
  • 8. Application Before we start with creating actual HelloWorld application using AngularJS, let us see what are the actual parts of a AngularJS application. An AngularJS application consists of following three important parts ng-app : This directive defines and links an AngularJS application to HTML. ng-model : This directive binds the values of AngularJS application data to HTML input controls. ng-bind : This directive bidns the AngularJS Application data to HTML tags.
  • 9. Test App <html> <title>AngularJS First Application</title> <body> <h1>Sample Application</h1> <div ng-app=""> <p>Enter your Name: <input type="text" ng-model="name"></p> <p>Hello <span ng-bind="name"></span>!</p> </div> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.m in.js"></script> </body> </html>
  • 10. AngularJS Directives AngularJS directives are used to extend HTML. These are special attributes starting with ng- prefix. We're going to discuss following directives: ng-app - This directive starts an AngularJS Application. ng-init - This directive initializes application data. ng-model - This directive defines the model that is variable to be used in AngularJS. ng-repeat - This directive repeats html elements for each item in a collection.
  • 11. AngularJS Controllers <html> <head> <title>Angular JS Controller</title> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script> </head> <body> <h2>AngularJS Sample Application</h2> <div ng-app="mainApp" ng-controller="studentController"> Enter first name: <input type="text" ng-model="student.firstName"><br><br> Enter last name: <input type="text" ng-model="student.lastName"><br> <br> You are entering: {{student.fullName()}} </div>
  • 12. AngularJS Controllers <script> var mainApp = angular.module("mainApp", []); mainApp.controller('studentController', function($scope) { $scope.student = { firstName: "Mahesh", lastName: "Parashar", fullName: function() { var studentObject; studentObject = $scope.student; return studentObject.firstName + " " + studentObject.lastName; } }; }); </script>
  • 13. Ajax test code <html> <head> <title>Angular JS Includes</title> </head> <body> <h2>AngularJS Sample Application</h2> <div ng-app="" ng-controller="studentController"> <table> <tr ng-repeat="student in students"> <td>{{ student.Name }}</td> <td>{{ student.RollNo }}</td> <td>{{ student.Percentage }}</td> </tr> </table>
  • 14. <script> function studentController($scope,$http) { var url="data.txt"; $http.get(url).success( function(response) { $scope.students = response; }); } </script> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.min.js"></script> </body> </html>
  • 16. Hello AngularJS <p ng:init="greeting = 'Hello World!'">{{greeting}}</p>
  • 17. Html Dom 1 ng-disabled disables a given control. 2 ng-show shows a given control. 3 ng-hide hides a given control. 4 ng-click represents a AngularJS click event.
  • 18. Advanced AngularJS Concept •Dependency Injection •Modularity •Digesting •Scope •Handling SEO •End to End Testing •Promises •Localization •Filters
  • 19. Services This service is used to display toast message for every action. Sample Code:- mainApp.service('getToast', ['$mdToast', '$animate', function($mdToast, $animate) { this.messageBox = function(msg, type) { var box = $mdToast.show( $mdToast.simple() .textContent(msg) .position('top right') .theme(type) .hideDelay(2000) ); return box; } }]);
  • 20. Factory This factory is used to list users which is saved as json file. Sample Code mainApp.factory('myAppFactory', function($http) { return { getData: function() { return $http({ method: 'GET', url: 'json/userlist.json' }); } } })
  • 21. Dis-advantage Angular is not the silver bullet. Some of its disadvantages are backsides of its strong points, some are inherent to the JavaScript ineffectiveness that could not be overcome even with the best derivatives. The weaknesses are: ● Angular is big and complicated. With multiple ways to do the same thing it is hard to tell which way is better for particular task. Mastering Angular over the “Hello world” level requires considerable efforts. Different developers’ coding styles and habits might complicate integration of different components into a whole solution. ●The lifecycle of Angular application is complex, and to master it you really need to read the code. Compile and link are not intuitive, and specific cases can be confusing (recursion in compile, collisions between directives etc.). ●As the project grows with time, you most likely will need to throw away existing implementations and create new versions using different approaches. Angular implementations scale poorly. ●More than 2000 watchers can severely lag the UI. That limits the complexity of your Angular forms, especially big data grids and lists.
  • 23. Basement (-2), Thejaswini Building Technopark, Kerala 695 581, India www.orisys.in Email: [email protected] , Office (Technopark) :+91-9946 014 345 Office (Sasthamangalam) :+91-8086 800 203