SlideShare a Scribd company logo
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
Angular JS Basics.
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 (20)

PDF
Creating Extensible Plugins for WordPress
Hristo Chakarov
 
PPTX
Optimizing and Deploying Angular
John Papa
 
PPTX
I am-one-with-angular
John Papa
 
PDF
Why do you use java script
kazuhisa kawashima
 
PDF
Xdebug as a Drupal debugging tool
Vladimir Melnic
 
PPTX
Angular | Dev Love Components
Teeraphong Chaichalermpreecha
 
PPTX
Desktop, Web e Mobile
Paulo Moura
 
PDF
Codemotion Rome 2016 - Polymer
Maurizio Mangione
 
PPTX
Webpack
Anjali Chawla
 
PDF
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
rtCamp
 
PDF
Quanto è sicuro il tuo wordpress?
GGDBologna
 
PDF
GAE for PHP - 10 Min to Learn
Chen Yi-Huan
 
PDF
Nguyễn hữu bình
TopDev.vn
 
KEY
DC Alt.Net: Building Web Apps With node.js
Troy Goode
 
PPTX
Vue js for beginner
Chandrasekar G
 
PDF
設計與程式的溝通之道
Even Wu
 
PDF
Javascript fullstasck
William Bruno Moraes
 
PPTX
Visual regression testing
Liam McMurray
 
PDF
Vue.js
BADR
 
Creating Extensible Plugins for WordPress
Hristo Chakarov
 
Optimizing and Deploying Angular
John Papa
 
I am-one-with-angular
John Papa
 
Why do you use java script
kazuhisa kawashima
 
Xdebug as a Drupal debugging tool
Vladimir Melnic
 
Angular | Dev Love Components
Teeraphong Chaichalermpreecha
 
Desktop, Web e Mobile
Paulo Moura
 
Codemotion Rome 2016 - Polymer
Maurizio Mangione
 
Webpack
Anjali Chawla
 
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
rtCamp
 
Quanto è sicuro il tuo wordpress?
GGDBologna
 
GAE for PHP - 10 Min to Learn
Chen Yi-Huan
 
Nguyễn hữu bình
TopDev.vn
 
DC Alt.Net: Building Web Apps With node.js
Troy Goode
 
Vue js for beginner
Chandrasekar G
 
設計與程式的溝通之道
Even Wu
 
Javascript fullstasck
William Bruno Moraes
 
Visual regression testing
Liam McMurray
 
Vue.js
BADR
 

Viewers also liked (12)

PDF
Solution of Team hexmatter+rush at Code4Good Sri Lanka Hackathon
Prabhani ThembiliyaGodage
 
PDF
Starting an AngularJS Project with Visual Studio
Iran Reyes Fleitas
 
PDF
Mark Huelsenbeck DOS
Mark Huelsenbeck
 
PPTX
วิธีไลท์ข้อมูลลงแผ่นง่ายๆโดยใช้โปรแกรม Nero
ประภัสสร สุพรรณโมก
 
PDF
Analysis of Economic and Welfare Polcies of Tribals in Goa
J Tanay
 
PPTX
informe
Marco Mora
 
PPTX
การทำให้ข้อความหรือวัตถุเคลื่อนไหว
ประภัสสร สุพรรณโมก
 
PPTX
การทำให้ข้อความหรือวัตถุเคลื่อนไหว
ประภัสสร สุพรรณโมก
 
PPTX
วิธีไลท์ข้อมูลลงแผ่นง่ายๆโดยใช้โปรแกรม Nero
ประภัสสร สุพรรณโมก
 
PPSX
Pretty Krafts Kids Organisers-final
Geetanjali Pandole
 
PPTX
Административная ответственность
Денис Клянченко
 
PPTX
The British Clinic UAE
xyzseo4
 
Solution of Team hexmatter+rush at Code4Good Sri Lanka Hackathon
Prabhani ThembiliyaGodage
 
Starting an AngularJS Project with Visual Studio
Iran Reyes Fleitas
 
Mark Huelsenbeck DOS
Mark Huelsenbeck
 
วิธีไลท์ข้อมูลลงแผ่นง่ายๆโดยใช้โปรแกรม Nero
ประภัสสร สุพรรณโมก
 
Analysis of Economic and Welfare Polcies of Tribals in Goa
J Tanay
 
informe
Marco Mora
 
การทำให้ข้อความหรือวัตถุเคลื่อนไหว
ประภัสสร สุพรรณโมก
 
การทำให้ข้อความหรือวัตถุเคลื่อนไหว
ประภัสสร สุพรรณโมก
 
วิธีไลท์ข้อมูลลงแผ่นง่ายๆโดยใช้โปรแกรม Nero
ประภัสสร สุพรรณโมก
 
Pretty Krafts Kids Organisers-final
Geetanjali Pandole
 
Административная ответственность
Денис Клянченко
 
The British Clinic UAE
xyzseo4
 
Ad

Similar to Angular JS Basics. (20)

PDF
AngularJs
Abdhesh Kumar
 
PDF
Angularjs 131211063348-phpapp01
Arunangsu Sahu
 
PPTX
Front end development with Angular JS
Bipin
 
PDF
Angular js
Knoldus Inc.
 
PDF
AngularJS Basics
Manaday Mavani
 
PPTX
Kalp Corporate Angular Js Tutorials
Kalp Corporate
 
PDF
Workshop 12: AngularJS Parte I
Visual Engineering
 
DOCX
Angular js
prasaddammalapati
 
PDF
AngularJS in practice
Eugene Fidelin
 
PPT
AngularJS Mobile Warsaw 20-10-2014
Dariusz Kalbarczyk
 
PDF
Ng-init
Hamdi Hmidi
 
PDF
Ng-init
Hamdi Hmidi
 
PDF
Angular.js Primer in Aalto University
SC5.io
 
PPTX
Valentine with Angular js - Introduction
Senthil Kumar
 
PDF
Nicolas Embleton, Advanced Angular JS
JavaScript Meetup HCMC
 
PPTX
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
Learnimtactics
 
PDF
gDayX 2013 - Advanced AngularJS - Nicolas Embleton
George Nguyen
 
PPT
Introduction to AngularJS
Anass90
 
PPTX
Training On Angular Js
Mahima Radhakrishnan
 
PDF
Mobile phone future angular js
atanacy
 
AngularJs
Abdhesh Kumar
 
Angularjs 131211063348-phpapp01
Arunangsu Sahu
 
Front end development with Angular JS
Bipin
 
Angular js
Knoldus Inc.
 
AngularJS Basics
Manaday Mavani
 
Kalp Corporate Angular Js Tutorials
Kalp Corporate
 
Workshop 12: AngularJS Parte I
Visual Engineering
 
Angular js
prasaddammalapati
 
AngularJS in practice
Eugene Fidelin
 
AngularJS Mobile Warsaw 20-10-2014
Dariusz Kalbarczyk
 
Ng-init
Hamdi Hmidi
 
Ng-init
Hamdi Hmidi
 
Angular.js Primer in Aalto University
SC5.io
 
Valentine with Angular js - Introduction
Senthil Kumar
 
Nicolas Embleton, Advanced Angular JS
JavaScript Meetup HCMC
 
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
Learnimtactics
 
gDayX 2013 - Advanced AngularJS - Nicolas Embleton
George Nguyen
 
Introduction to AngularJS
Anass90
 
Training On Angular Js
Mahima Radhakrishnan
 
Mobile phone future angular js
atanacy
 
Ad

Recently uploaded (20)

PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
July Patch Tuesday
Ivanti
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Biography of Daniel Podor.pdf
Daniel Podor
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 

Angular JS Basics.