SlideShare a Scribd company logo
Getting Started with AngularJS
Senthil Kumar
Microsoft MVP – Windows Platform Development
MobileOSGeek.com
About Me
• Work for Trivium eSolutions , Bangalore
• Microsoft MVP in Windows Platform
Development.
• Speaker , Blogger and Software Engineer
• BDotNetter
• Blog about Mobile development at
MobileOSGeek.com
• Twitter : @isenthil
Valentine with Angular js - Introduction
Valentine with Angular js - Introduction
Valentine with Angular js - Introduction
Agenda
• What is Angular ?
• Why Angular ?
• Ways of getting angular
• Basic Concepts
• Quick Demo
What is AngularJS?
Angular JS facts
• Open-source JavaScript framework
• For Creating Single Page Applications.
• Developed in 2009 by Miško Hevery and Adam Abrons
• Maintained by Google
• Actively developed and supported.
• GitHub: https://github.com/angular/angular.js
Why AngularJS ?
• Faster way to create Web Applications.
• The problem – HTML is great for static pages, but has no tools for
web applications.
• The solution – extend and adapt HTML vocabulary with some
additional declarations that are useful for web applications
• Excellent templating engine (integral part of HTML)
• Easily load Json Data
• MVC Architecture
Core Features
• Directives
• Data Binding
• Filters
More benefits
• Less boilerplate code
• Better focus on the Logic
• Efficiency in development
• Separation of concerns
Getting AngularJS
• Including angular scripts from the Google CDN
• Point your html <script> tag to a Google CDN URL.
• angular.js — This is the human-readable, non-minified version, suitable for web
development.
• angular.min.js — This is the minified version, which we strongly suggest you
use in production.
<script
src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js">
</script>
• Downloading and hosting angular files locally
http://code.angularjs.org/
Getting Angular JS
• Install the latest version of GitHub for Windows from
https://windows.github.com/
• Bower: We use Bower to manage client-side packages for the docs.
Install the bower command-line tool globally with:
• npm install -g bower
• Visual Studio NugetPackage Manager
Angular JS is MVC
• MVC = Model-View-Controller
• Less dependencies
• Improves maintainability
• It is easier to read and understand code
MVC
Model
The data
Controller
The behavior
Modifying / updating the models
View
The interface
How the data is presented to the user
JavaScript
HTML
Data Binding
Views are declarative
The structure of the interface
Controllers do not need to directly manipulate the view
Changes in the models / data are automatically reflected in the view
Updates are managed by the framework
No DOM manipulation boilerplate needed!
Views
Make use of special ng attributes (directives) on the HTML elements
ng-app
• Determines which part of the page will use AngularJS
• If given a value it will load that application module
ng-controller
• Determines which Javascript Controller should be used for that part of the page
ng-model
• Determines what model the value of an input field will be bound to
• Used for two-way binding
Views
{{ }}
Angular expressions
• Like JavaScript expressions except:
• Evaluated in the current scope not the global window
• More forgiving to undefined and null errors
Insert model values directly into the view
Controller
Function that takes at least one parameter: $scope
Function is a constructor
Ex:
• function MyCtrl($scope) { … }
We will see a different way of creating a controller constructor later
$scope
JavaScript object
Contains data (i.e. models) and methods (i.e. functions)
Can add own properties
• $scope.<my new property> = <value>;
Controller
Dependency Injection
Pass the modules and services that you need as parameters
In the previous case $scope is a service that will be injected
Can be passed as an array of strings to the controller function as well
• Prevents errors when performing minification
Other useful services
• $http
• Used to handle Ajax calls
• Wrappers around jQuery
Controller
Typically also contains module loading
angular.module(<name>, [<dependencies>]);
Creates a module with the given name
This module can then be configured
Ex.
• var myApp = angular.module(‘myApp’, []);
myApp.controller(‘MyCtrl’, function($scope) { … });
myApp.controller(‘OtherCtrl’, [‘$scope’, ‘$http’, function($scope, $http) { … }]);
Modules
Can be used to separate the application into parts
Application module can include the other modules by listing them as
dependencies
Modules
var myControllers = angular.module(‘myControllers’, []);
// Add controllers to the module
myControllers.controller(…);
var myApp = angular.module(‘myApp’, [‘myControllers’]);
Models
Properties on the Controller’s $scope object
Standard JavaScript values
More
To learn more:
Tutorial: http://docs.angularjs.org/tutorial
Documentation: http://docs.angularjs.org/guide/overview

More Related Content

PPTX
Introduction to Angular JS
Santhosh Kumar Srinivasan
 
PPTX
Entity Framework Core 1.0
Senthil Kumar
 
PPTX
Angular 4
Saurabh Juneja
 
PPTX
Introduction of ASP.NET MVC and AngularJS
Mohamed Elkhodary
 
PPTX
Angular JS, A dive to concepts
Abhishek Sur
 
PDF
Introduction to ASP.NET MVC
Sirwan Afifi
 
PPT
Angular js
yogi_solanki
 
PPT
Angular js
Hritesh Saha
 
Introduction to Angular JS
Santhosh Kumar Srinivasan
 
Entity Framework Core 1.0
Senthil Kumar
 
Angular 4
Saurabh Juneja
 
Introduction of ASP.NET MVC and AngularJS
Mohamed Elkhodary
 
Angular JS, A dive to concepts
Abhishek Sur
 
Introduction to ASP.NET MVC
Sirwan Afifi
 
Angular js
yogi_solanki
 
Angular js
Hritesh Saha
 

What's hot (20)

PPTX
Angular js presentation at Datacom
David Xi Peng Yang
 
PPTX
AngularJS intro
dizabl
 
PPTX
Angularjs Basics
Jayantha Sirisena
 
PPTX
Step by Step - AngularJS
Infragistics
 
PPTX
AngularJS Beginners Workshop
Sathish VJ
 
PDF
React.js - and how it changed our thinking about UI
Marcin Grzywaczewski
 
PPTX
SenchaCon 2016: Enterprise Applications, Role Based Access Controls (RBAC) an...
Sencha
 
PDF
Angular JS tutorial
cncwebworld
 
PDF
Angular 2 overview
Jesse Warden
 
PPTX
AngularJS - Architecture decisions in a large project 
Elad Hirsch
 
PDF
Drupal & AngularJS - DrupalCamp Spain 2014
Juampy NR
 
PDF
Angular2 Development for Java developers
Yakov Fain
 
PPTX
AngularJS 2.0
Boyan Mihaylov
 
PDF
iOS viper presentation
Rajat Datta
 
PPTX
Introduction to angular with a simple but complete project
Jadson Santos
 
PDF
AngularJS Basics
Nikita Shounewich
 
PPTX
Introduction to single page application with angular js
Mindfire Solutions
 
PPTX
Mvc framework
Dhurham Fahem
 
PPTX
Front end development with Angular JS
Bipin
 
PPTX
React js Online Training
Learntek1
 
Angular js presentation at Datacom
David Xi Peng Yang
 
AngularJS intro
dizabl
 
Angularjs Basics
Jayantha Sirisena
 
Step by Step - AngularJS
Infragistics
 
AngularJS Beginners Workshop
Sathish VJ
 
React.js - and how it changed our thinking about UI
Marcin Grzywaczewski
 
SenchaCon 2016: Enterprise Applications, Role Based Access Controls (RBAC) an...
Sencha
 
Angular JS tutorial
cncwebworld
 
Angular 2 overview
Jesse Warden
 
AngularJS - Architecture decisions in a large project 
Elad Hirsch
 
Drupal & AngularJS - DrupalCamp Spain 2014
Juampy NR
 
Angular2 Development for Java developers
Yakov Fain
 
AngularJS 2.0
Boyan Mihaylov
 
iOS viper presentation
Rajat Datta
 
Introduction to angular with a simple but complete project
Jadson Santos
 
AngularJS Basics
Nikita Shounewich
 
Introduction to single page application with angular js
Mindfire Solutions
 
Mvc framework
Dhurham Fahem
 
Front end development with Angular JS
Bipin
 
React js Online Training
Learntek1
 
Ad

Similar to Valentine with Angular js - Introduction (20)

DOCX
angularjs_tutorial.docx
telegramvip
 
PPTX
Training On Angular Js
Mahima Radhakrishnan
 
PPTX
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
murtazahaveliwala
 
PPTX
Kalp Corporate Angular Js Tutorials
Kalp Corporate
 
PDF
Ng-init
Hamdi Hmidi
 
PDF
Ng-init
Hamdi Hmidi
 
PPTX
Angular Javascript Tutorial with command
ssuser42b933
 
PDF
AngularJS By Vipin
Vipin Mundayad
 
PPTX
Angularjs
Sabin Tamrakar
 
PPTX
ANGULAR JS TRAINING IN PUNE
cncwebworld
 
PPTX
ME vs WEB - AngularJS Fundamentals
Aviran Cohen
 
PDF
AngularJs
Abdhesh Kumar
 
PDF
Angularjs 131211063348-phpapp01
Arunangsu Sahu
 
PPT
Getting started with angular js
Maurice De Beijer [MVP]
 
PPTX
Ajs ppt
Avyaya Tarnaka
 
PDF
One Weekend With AngularJS
Yashobanta Bai
 
PPTX
AngularJS is awesome
Eusebiu Schipor
 
PPTX
Intro to AngularJs
SolTech, Inc.
 
PPT
Coffee@DBG - Exploring Angular JS
Deepu S Nath
 
angularjs_tutorial.docx
telegramvip
 
Training On Angular Js
Mahima Radhakrishnan
 
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
murtazahaveliwala
 
Kalp Corporate Angular Js Tutorials
Kalp Corporate
 
Ng-init
Hamdi Hmidi
 
Ng-init
Hamdi Hmidi
 
Angular Javascript Tutorial with command
ssuser42b933
 
AngularJS By Vipin
Vipin Mundayad
 
Angularjs
Sabin Tamrakar
 
ANGULAR JS TRAINING IN PUNE
cncwebworld
 
ME vs WEB - AngularJS Fundamentals
Aviran Cohen
 
AngularJs
Abdhesh Kumar
 
Angularjs 131211063348-phpapp01
Arunangsu Sahu
 
Getting started with angular js
Maurice De Beijer [MVP]
 
One Weekend With AngularJS
Yashobanta Bai
 
AngularJS is awesome
Eusebiu Schipor
 
Intro to AngularJs
SolTech, Inc.
 
Coffee@DBG - Exploring Angular JS
Deepu S Nath
 
Ad

More from Senthil Kumar (7)

PPTX
New Things in C# 6.0
Senthil Kumar
 
PPTX
App to App Communication in Windows Phone 8 - VTC 2014
Senthil Kumar
 
PPTX
Windows Azure Mobile Services at ReBOOT Cloud Camp , Bangalore
Senthil Kumar
 
PPTX
Microsoft MVP Mentor Series - Speech features in Windows Phone 8 .
Senthil Kumar
 
PDF
Windows phone day in Bangalore (Enabling Speech in your Windows Phone Apps)
Senthil Kumar
 
PDF
Windows phone toolkit Session @ TechCon 2013 , Bangalore
Senthil Kumar
 
PDF
Location and map api in windows phone 8
Senthil Kumar
 
New Things in C# 6.0
Senthil Kumar
 
App to App Communication in Windows Phone 8 - VTC 2014
Senthil Kumar
 
Windows Azure Mobile Services at ReBOOT Cloud Camp , Bangalore
Senthil Kumar
 
Microsoft MVP Mentor Series - Speech features in Windows Phone 8 .
Senthil Kumar
 
Windows phone day in Bangalore (Enabling Speech in your Windows Phone Apps)
Senthil Kumar
 
Windows phone toolkit Session @ TechCon 2013 , Bangalore
Senthil Kumar
 
Location and map api in windows phone 8
Senthil Kumar
 

Recently uploaded (20)

PPTX
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
PDF
Become an Agentblazer Champion Challenge Kickoff
Dele Amefo
 
PPTX
Audio Editing and it's techniques in computer graphics.pptx
fosterbayirinia3
 
PDF
Bandai Playdia The Book - David Glotz
BluePanther6
 
PPTX
Presentation of Computer CLASS 2 .pptx
darshilchaudhary558
 
PPTX
Hire Expert Blazor Developers | Scalable Solutions by OnestopDA
OnestopDA
 
PDF
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
QAware GmbH
 
PDF
A REACT POMODORO TIMER WEB APPLICATION.pdf
Michael624841
 
PDF
Emergency Mustering solutions – A Brief overview
Personnel Tracking
 
PDF
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
ESUG
 
PDF
Micromaid: A simple Mermaid-like chart generator for Pharo
ESUG
 
PPTX
10 Hidden App Development Costs That Can Sink Your Startup.pptx
Lunar Web Solution
 
PPTX
Materi-Enum-and-Record-Data-Type (1).pptx
RanuFajar1
 
DOCX
The Future of Smart Factories Why Embedded Analytics Leads the Way
Varsha Nayak
 
PPT
FALLSEM2025-26_ISWE304L_TH_VL2025260102786_2025-07-10_Reference-Material-II.ppt
AKSHAYA255427
 
PDF
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
PDF
Rise With SAP partner in Mumbai.........
pts464036
 
PDF
The Future of Smart Factories Why Embedded Analytics Leads the Way
Varsha Nayak
 
PDF
Community & News Update Q2 Meet Up 2025
VictoriaMetrics
 
PPTX
Services offered by Dynamic Solutions in Pakistan
DaniyaalAdeemShibli1
 
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
Become an Agentblazer Champion Challenge Kickoff
Dele Amefo
 
Audio Editing and it's techniques in computer graphics.pptx
fosterbayirinia3
 
Bandai Playdia The Book - David Glotz
BluePanther6
 
Presentation of Computer CLASS 2 .pptx
darshilchaudhary558
 
Hire Expert Blazor Developers | Scalable Solutions by OnestopDA
OnestopDA
 
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
QAware GmbH
 
A REACT POMODORO TIMER WEB APPLICATION.pdf
Michael624841
 
Emergency Mustering solutions – A Brief overview
Personnel Tracking
 
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
ESUG
 
Micromaid: A simple Mermaid-like chart generator for Pharo
ESUG
 
10 Hidden App Development Costs That Can Sink Your Startup.pptx
Lunar Web Solution
 
Materi-Enum-and-Record-Data-Type (1).pptx
RanuFajar1
 
The Future of Smart Factories Why Embedded Analytics Leads the Way
Varsha Nayak
 
FALLSEM2025-26_ISWE304L_TH_VL2025260102786_2025-07-10_Reference-Material-II.ppt
AKSHAYA255427
 
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
Rise With SAP partner in Mumbai.........
pts464036
 
The Future of Smart Factories Why Embedded Analytics Leads the Way
Varsha Nayak
 
Community & News Update Q2 Meet Up 2025
VictoriaMetrics
 
Services offered by Dynamic Solutions in Pakistan
DaniyaalAdeemShibli1
 

Valentine with Angular js - Introduction

  • 1. Getting Started with AngularJS Senthil Kumar Microsoft MVP – Windows Platform Development MobileOSGeek.com
  • 2. About Me • Work for Trivium eSolutions , Bangalore • Microsoft MVP in Windows Platform Development. • Speaker , Blogger and Software Engineer • BDotNetter • Blog about Mobile development at MobileOSGeek.com • Twitter : @isenthil
  • 6. Agenda • What is Angular ? • Why Angular ? • Ways of getting angular • Basic Concepts • Quick Demo
  • 8. Angular JS facts • Open-source JavaScript framework • For Creating Single Page Applications. • Developed in 2009 by Miško Hevery and Adam Abrons • Maintained by Google • Actively developed and supported. • GitHub: https://github.com/angular/angular.js
  • 9. Why AngularJS ? • Faster way to create Web Applications. • The problem – HTML is great for static pages, but has no tools for web applications. • The solution – extend and adapt HTML vocabulary with some additional declarations that are useful for web applications • Excellent templating engine (integral part of HTML) • Easily load Json Data • MVC Architecture
  • 10. Core Features • Directives • Data Binding • Filters
  • 11. More benefits • Less boilerplate code • Better focus on the Logic • Efficiency in development • Separation of concerns
  • 12. Getting AngularJS • Including angular scripts from the Google CDN • Point your html <script> tag to a Google CDN URL. • angular.js — This is the human-readable, non-minified version, suitable for web development. • angular.min.js — This is the minified version, which we strongly suggest you use in production. <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js"> </script> • Downloading and hosting angular files locally http://code.angularjs.org/
  • 13. Getting Angular JS • Install the latest version of GitHub for Windows from https://windows.github.com/ • Bower: We use Bower to manage client-side packages for the docs. Install the bower command-line tool globally with: • npm install -g bower • Visual Studio NugetPackage Manager
  • 14. Angular JS is MVC • MVC = Model-View-Controller • Less dependencies • Improves maintainability • It is easier to read and understand code
  • 15. MVC Model The data Controller The behavior Modifying / updating the models View The interface How the data is presented to the user JavaScript HTML
  • 16. Data Binding Views are declarative The structure of the interface Controllers do not need to directly manipulate the view Changes in the models / data are automatically reflected in the view Updates are managed by the framework No DOM manipulation boilerplate needed!
  • 17. Views Make use of special ng attributes (directives) on the HTML elements ng-app • Determines which part of the page will use AngularJS • If given a value it will load that application module ng-controller • Determines which Javascript Controller should be used for that part of the page ng-model • Determines what model the value of an input field will be bound to • Used for two-way binding
  • 18. Views {{ }} Angular expressions • Like JavaScript expressions except: • Evaluated in the current scope not the global window • More forgiving to undefined and null errors Insert model values directly into the view
  • 19. Controller Function that takes at least one parameter: $scope Function is a constructor Ex: • function MyCtrl($scope) { … } We will see a different way of creating a controller constructor later $scope JavaScript object Contains data (i.e. models) and methods (i.e. functions) Can add own properties • $scope.<my new property> = <value>;
  • 20. Controller Dependency Injection Pass the modules and services that you need as parameters In the previous case $scope is a service that will be injected Can be passed as an array of strings to the controller function as well • Prevents errors when performing minification Other useful services • $http • Used to handle Ajax calls • Wrappers around jQuery
  • 21. Controller Typically also contains module loading angular.module(<name>, [<dependencies>]); Creates a module with the given name This module can then be configured Ex. • var myApp = angular.module(‘myApp’, []); myApp.controller(‘MyCtrl’, function($scope) { … }); myApp.controller(‘OtherCtrl’, [‘$scope’, ‘$http’, function($scope, $http) { … }]);
  • 22. Modules Can be used to separate the application into parts Application module can include the other modules by listing them as dependencies
  • 23. Modules var myControllers = angular.module(‘myControllers’, []); // Add controllers to the module myControllers.controller(…); var myApp = angular.module(‘myApp’, [‘myControllers’]);
  • 24. Models Properties on the Controller’s $scope object Standard JavaScript values
  • 25. More To learn more: Tutorial: http://docs.angularjs.org/tutorial Documentation: http://docs.angularjs.org/guide/overview