SlideShare a Scribd company logo
1 of 13
Download to read offline
Building Modern Web Apps with
ANGULARJS
● Node Package Manager (NPM).
○ https://nodejs.org/en/download/
● Grunt, Yeoman, Bower
○ http://grunt.io/
○ http://yeoman.io/
○ http://bower.io/
● HTML5 template.
○ http://www.initializr.com/
Tools set
● npm install -g yo
● npm install -g bower
● npm install -g grunt-cli
● yo
● grunt serve
Initializing
Modules and Controllers
angular.module(‘moduleName’,[dependencies]);
angular.module('moduleName')
.controller('controllerName', function () {
this.attributeName=”value”;
});
Expressions
<body ng-app="moduleName">
....
<div ng-controller="controllerName">
<h1>{{attributeName}}</h1>
</div>
....
</body>
Expressions [example]
<body ng-app="blogApp">
....
<div ng-controller="BlogCtrl as blog">
<h1>{{blog.title}}</h1>
</div>
....
</body>
Expressions [example 2]
<body ng-app="blogApp">
....
<div ng-controller="BlogCtrl as blog">
<h1>{{blog.title}}</h1>
<input type="text" ng-model="blog.title" value="GDG"/>
</div>
....
</body>
Routes
angular.config(function ($routeProvider) {
$routeProvider
.when('/', {
templateUrl: 'views/main.html',
controller: 'MainCtrl',
controllerAs: 'main'
})
.when('/about', {
templateUrl: 'views/about.html',
controller: 'AboutCtrl',
controllerAs: 'about'
})
.otherwise({
redirectTo: '/'
});
});
Views and templates
<body ng-app="blogApp">
....
<div class="container">
<div ng-view=""></div>
</div>
....
</body>
Directives ng-repeat
<body ng-app="blogApp">
....
<div ng-controller="BlogCtrl as blog">
<h1 ng-repeat="posts as post">{{post.title}}</h1>
</div>
....
</body>
Services
angular.module('moduleName')
.service('serviceName', function() {
this.functionName=function(text){
return "Hello";
};
});
Services [Example]
angular.module('blog')
.service('postService', function() {
this.getPosts=function(){
return(Json);
};
});

More Related Content

What's hot

Creating Extensible Plugins for WordPress
Creating Extensible Plugins for WordPressCreating Extensible Plugins for WordPress
Creating Extensible Plugins for WordPress
Hristo Chakarov
 
Codemotion Rome 2016 - Polymer
Codemotion Rome 2016 - PolymerCodemotion Rome 2016 - Polymer
Codemotion Rome 2016 - Polymer
Maurizio Mangione
 
Quanto è sicuro il tuo wordpress?
Quanto è sicuro il tuo wordpress? Quanto è sicuro il tuo wordpress?
Quanto è sicuro il tuo wordpress?
GGDBologna
 
DC Alt.Net: Building Web Apps With node.js
DC Alt.Net: Building Web Apps With node.jsDC Alt.Net: Building Web Apps With node.js
DC Alt.Net: Building Web Apps With node.js
Troy Goode
 

What's hot (20)

Creating Extensible Plugins for WordPress
Creating Extensible Plugins for WordPressCreating Extensible Plugins for WordPress
Creating Extensible Plugins for WordPress
 
Optimizing and Deploying Angular
Optimizing and Deploying AngularOptimizing and Deploying Angular
Optimizing and Deploying Angular
 
I am-one-with-angular
I am-one-with-angularI am-one-with-angular
I am-one-with-angular
 
Why do you use java script
Why do you use  java script Why do you use  java script
Why do you use java script
 
Xdebug as a Drupal debugging tool
Xdebug as a Drupal debugging toolXdebug as a Drupal debugging tool
Xdebug as a Drupal debugging tool
 
Angular | Dev Love Components
Angular | Dev Love ComponentsAngular | Dev Love Components
Angular | Dev Love Components
 
Desktop, Web e Mobile
Desktop, Web e MobileDesktop, Web e Mobile
Desktop, Web e Mobile
 
Codemotion Rome 2016 - Polymer
Codemotion Rome 2016 - PolymerCodemotion Rome 2016 - Polymer
Codemotion Rome 2016 - Polymer
 
Webpack
WebpackWebpack
Webpack
 
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
 
Quanto è sicuro il tuo wordpress?
Quanto è sicuro il tuo wordpress? Quanto è sicuro il tuo wordpress?
Quanto è sicuro il tuo wordpress?
 
GAE for PHP - 10 Min to Learn
GAE for PHP - 10 Min to LearnGAE for PHP - 10 Min to Learn
GAE for PHP - 10 Min to Learn
 
Nguyễn hữu bình
Nguyễn hữu bìnhNguyễn hữu bình
Nguyễn hữu bình
 
DC Alt.Net: Building Web Apps With node.js
DC Alt.Net: Building Web Apps With node.jsDC Alt.Net: Building Web Apps With node.js
DC Alt.Net: Building Web Apps With node.js
 
Vue js for beginner
Vue js for beginner Vue js for beginner
Vue js for beginner
 
設計與程式的溝通之道
設計與程式的溝通之道設計與程式的溝通之道
設計與程式的溝通之道
 
Javascript fullstasck
Javascript fullstasckJavascript fullstasck
Javascript fullstasck
 
Visual regression testing
Visual regression testingVisual regression testing
Visual regression testing
 
Vue.js
Vue.jsVue.js
Vue.js
 
Vuejs
VuejsVuejs
Vuejs
 

Viewers also liked

วิธีไลท์ข้อมูลลงแผ่นง่ายๆโดยใช้โปรแกรม Nero
วิธีไลท์ข้อมูลลงแผ่นง่ายๆโดยใช้โปรแกรม Neroวิธีไลท์ข้อมูลลงแผ่นง่ายๆโดยใช้โปรแกรม Nero
วิธีไลท์ข้อมูลลงแผ่นง่ายๆโดยใช้โปรแกรม Nero
ประภัสสร สุพรรณโมก
 
Analysis of Economic and Welfare Polcies of Tribals in Goa
Analysis of Economic and Welfare Polcies of Tribals in GoaAnalysis of Economic and Welfare Polcies of Tribals in Goa
Analysis of Economic and Welfare Polcies of Tribals in Goa
J Tanay
 
การทำให้ข้อความหรือวัตถุเคลื่อนไหว
การทำให้ข้อความหรือวัตถุเคลื่อนไหวการทำให้ข้อความหรือวัตถุเคลื่อนไหว
การทำให้ข้อความหรือวัตถุเคลื่อนไหว
ประภัสสร สุพรรณโมก
 
การทำให้ข้อความหรือวัตถุเคลื่อนไหว
การทำให้ข้อความหรือวัตถุเคลื่อนไหวการทำให้ข้อความหรือวัตถุเคลื่อนไหว
การทำให้ข้อความหรือวัตถุเคลื่อนไหว
ประภัสสร สุพรรณโมก
 
วิธีไลท์ข้อมูลลงแผ่นง่ายๆโดยใช้โปรแกรม Nero
วิธีไลท์ข้อมูลลงแผ่นง่ายๆโดยใช้โปรแกรม Neroวิธีไลท์ข้อมูลลงแผ่นง่ายๆโดยใช้โปรแกรม Nero
วิธีไลท์ข้อมูลลงแผ่นง่ายๆโดยใช้โปรแกรม Nero
ประภัสสร สุพรรณโมก
 
Pretty Krafts Kids Organisers-final
Pretty Krafts Kids Organisers-finalPretty Krafts Kids Organisers-final
Pretty Krafts Kids Organisers-final
Geetanjali Pandole
 

Viewers also liked (13)

Solution of Team hexmatter+rush at Code4Good Sri Lanka Hackathon
Solution of Team hexmatter+rush at Code4Good Sri Lanka HackathonSolution of Team hexmatter+rush at Code4Good Sri Lanka Hackathon
Solution of Team hexmatter+rush at Code4Good Sri Lanka Hackathon
 
Starting an AngularJS Project with Visual Studio
Starting an AngularJS Project with Visual StudioStarting an AngularJS Project with Visual Studio
Starting an AngularJS Project with Visual Studio
 
Mark Huelsenbeck DOS
Mark Huelsenbeck DOSMark Huelsenbeck DOS
Mark Huelsenbeck DOS
 
Tekeningen Coencad
Tekeningen CoencadTekeningen Coencad
Tekeningen Coencad
 
วิธีไลท์ข้อมูลลงแผ่นง่ายๆโดยใช้โปรแกรม Nero
วิธีไลท์ข้อมูลลงแผ่นง่ายๆโดยใช้โปรแกรม Neroวิธีไลท์ข้อมูลลงแผ่นง่ายๆโดยใช้โปรแกรม Nero
วิธีไลท์ข้อมูลลงแผ่นง่ายๆโดยใช้โปรแกรม Nero
 
Analysis of Economic and Welfare Polcies of Tribals in Goa
Analysis of Economic and Welfare Polcies of Tribals in GoaAnalysis of Economic and Welfare Polcies of Tribals in Goa
Analysis of Economic and Welfare Polcies of Tribals in Goa
 
informe
informeinforme
informe
 
การทำให้ข้อความหรือวัตถุเคลื่อนไหว
การทำให้ข้อความหรือวัตถุเคลื่อนไหวการทำให้ข้อความหรือวัตถุเคลื่อนไหว
การทำให้ข้อความหรือวัตถุเคลื่อนไหว
 
การทำให้ข้อความหรือวัตถุเคลื่อนไหว
การทำให้ข้อความหรือวัตถุเคลื่อนไหวการทำให้ข้อความหรือวัตถุเคลื่อนไหว
การทำให้ข้อความหรือวัตถุเคลื่อนไหว
 
วิธีไลท์ข้อมูลลงแผ่นง่ายๆโดยใช้โปรแกรม Nero
วิธีไลท์ข้อมูลลงแผ่นง่ายๆโดยใช้โปรแกรม Neroวิธีไลท์ข้อมูลลงแผ่นง่ายๆโดยใช้โปรแกรม Nero
วิธีไลท์ข้อมูลลงแผ่นง่ายๆโดยใช้โปรแกรม Nero
 
Pretty Krafts Kids Organisers-final
Pretty Krafts Kids Organisers-finalPretty Krafts Kids Organisers-final
Pretty Krafts Kids Organisers-final
 
Административная ответственность
Административная ответственностьАдминистративная ответственность
Административная ответственность
 
The British Clinic UAE
The British Clinic UAEThe British Clinic UAE
The British Clinic UAE
 

Similar to Angular JS Basics.

gDayX - Advanced angularjs
gDayX - Advanced angularjsgDayX - Advanced angularjs
gDayX - Advanced angularjs
gdgvietnam
 
gDayX 2013 - Advanced AngularJS - Nicolas Embleton
gDayX 2013 - Advanced AngularJS - Nicolas EmbletongDayX 2013 - Advanced AngularJS - Nicolas Embleton
gDayX 2013 - Advanced AngularJS - Nicolas Embleton
George Nguyen
 

Similar to Angular JS Basics. (20)

Nicolas Embleton, Advanced Angular JS
Nicolas Embleton, Advanced Angular JSNicolas Embleton, Advanced Angular JS
Nicolas Embleton, Advanced Angular JS
 
GDayX - Advanced Angular.JS
GDayX - Advanced Angular.JSGDayX - Advanced Angular.JS
GDayX - Advanced Angular.JS
 
Front end development with Angular JS
Front end development with Angular JSFront end development with Angular JS
Front end development with Angular JS
 
gDayX - Advanced angularjs
gDayX - Advanced angularjsgDayX - Advanced angularjs
gDayX - Advanced angularjs
 
Introduction of angular js
Introduction of angular jsIntroduction of angular js
Introduction of angular js
 
gDayX 2013 - Advanced AngularJS - Nicolas Embleton
gDayX 2013 - Advanced AngularJS - Nicolas EmbletongDayX 2013 - Advanced AngularJS - Nicolas Embleton
gDayX 2013 - Advanced AngularJS - Nicolas Embleton
 
Angular - Beginner
Angular - BeginnerAngular - Beginner
Angular - Beginner
 
Modern Development Tools
Modern Development ToolsModern Development Tools
Modern Development Tools
 
Angularjs - lazy loading techniques
Angularjs - lazy loading techniques Angularjs - lazy loading techniques
Angularjs - lazy loading techniques
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with Appium
 
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 3/3 - Web Components avec Po...
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 3/3 - Web Components avec Po...ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 3/3 - Web Components avec Po...
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 3/3 - Web Components avec Po...
 
Angular js-crash-course
Angular js-crash-courseAngular js-crash-course
Angular js-crash-course
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
 
AngularJS Project Setup step-by- step guide - RapidValue Solutions
AngularJS Project Setup step-by- step guide - RapidValue SolutionsAngularJS Project Setup step-by- step guide - RapidValue Solutions
AngularJS Project Setup step-by- step guide - RapidValue Solutions
 
Voorhoede - Front-end architecture
Voorhoede - Front-end architectureVoorhoede - Front-end architecture
Voorhoede - Front-end architecture
 
AngularJS: an introduction
AngularJS: an introductionAngularJS: an introduction
AngularJS: an introduction
 
mean stack
mean stackmean stack
mean stack
 
AngularJs Crash Course
AngularJs Crash CourseAngularJs Crash Course
AngularJs Crash Course
 
Grunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationGrunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous Integration
 
How to Implement Basic Angular Routing and Nested Routing With Params in Angu...
How to Implement Basic Angular Routing and Nested Routing With Params in Angu...How to Implement Basic Angular Routing and Nested Routing With Params in Angu...
How to Implement Basic Angular Routing and Nested Routing With Params in Angu...
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Recently uploaded (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Angular JS Basics.