SlideShare a Scribd company logo
AngularJS/:Routing 
Egor Miasnikov
AngularJS/:Routing/:AGENDA 
1. What is routing? 
2. What is SPA? 
3. AngularJS Routing 
4. Examples 
5. Questions
AngularJS/:Routing/:WhatIsRouting 
What is routing?
AngularJS/:Routing/:WhatIsRouting
AngularJS/:Routing/:WhatIsSPA 
What is SPA?
Dive into AngularJS Routing
AngularJS/:Routing/:WhatIsSPA
AngularJS/:Routing/:NeedToKnow 
• App.config 
• $routeProvider 
•Ng-view 
• Params 
• Events 
• Resolve
AngularJS/:Routing/:API 
app.config(function($routeProvider) { 
$routeProvider.when('/', { 
templateUrl: ‘app.html', 
controller: ‘AppCtrl‘ 
}); 
$routeProvider.otherwise({redirectTo: '/'}); 
});
AngularJS/:Routing/:WrongWay 
var app = angular.module("app", []); 
app.controller("AppCtrl", function($scope, $route){ 
$route.routes["/"] = { 
templateUrl: "app.html", 
controller: "AppCtrl" 
})
AngularJS/:Routing/:Directive 
<div> 
<ng-view></ng-view> 
</div>
AngularJS/:Routing/:Params 
app.config(function ($routeProvider) { 
$routeProvider.when('/:message',{ 
templateUrl: "app.html", 
controller: "AppCtrl" 
}) 
});
AngularJS/:Routing/:Params 
app.controller("AppCtrl", function ($scope, $routeParams) { 
$scope.message: $routeParams.message 
} 
});
AngularJS/:Routing/:Events 
$rootScope.$on(‘$routeChangeStart’, function(){}) 
$rootScope.$on(‘$routeChangeSuccess’, function(){}) 
$rootScope.$on(‘$routeChangeError’, function(){}) 
$rootScope.$on(‘$routeUpdate’, function(){})
AngularJS/:Routing/:Resolve 
$routeProvider.when('/', { 
…. 
resolve: { 
app: function ($q) { 
var defer = $q.defer; 
defer.resolve(); 
return defer.promise; 
} 
….
AngularJS/:Routing/:Example 
https://git.epam.com/epm-uii/blob/idea/idea/scripts/app.js
AngularJS/:Routing/:Questions

More Related Content

PDF
Angular JS Routing
PPTX
Building a dashboard using AngularJS
PDF
ui-router and $state
PPTX
UI-Router
DOCX
How routing works in angular js
PDF
Angular Promises and Advanced Routing
PPTX
AngularJS Routing
PDF
Ui router
Angular JS Routing
Building a dashboard using AngularJS
ui-router and $state
UI-Router
How routing works in angular js
Angular Promises and Advanced Routing
AngularJS Routing
Ui router

What's hot (20)

PDF
Architecture, Auth, and Routing with uiRouter
PDF
Angular js routing options
PPTX
AngularJS
PPTX
Dart and AngularDart
PPTX
Building an End-to-End AngularJS Application
PDF
CFUGbe talk about Angular JS
PPTX
Angular 2.0 Routing and Navigation
PPTX
AngularJS - $http & $resource Services
PPTX
Optimizing Angular Performance in Enterprise Single Page Apps
PPT
MEAN - Notes from the field (Full-Stack Development with Javascript)
PPTX
AngularJS Services
TXT
Comment pages 002
PDF
Binary Studio Academy 2016: Laravel Controllers
PDF
OttawaJS: angular accessibility
PPTX
AngularJS $Provide Service
PPTX
Introducing AngularJS
PPTX
Canjs
DOCX
Different way to share data between controllers in angular js
PDF
Codeigniter : Custom Routing - Manipulate Uri
PPTX
AngularJS $http Interceptors (Explanation and Examples)
Architecture, Auth, and Routing with uiRouter
Angular js routing options
AngularJS
Dart and AngularDart
Building an End-to-End AngularJS Application
CFUGbe talk about Angular JS
Angular 2.0 Routing and Navigation
AngularJS - $http & $resource Services
Optimizing Angular Performance in Enterprise Single Page Apps
MEAN - Notes from the field (Full-Stack Development with Javascript)
AngularJS Services
Comment pages 002
Binary Studio Academy 2016: Laravel Controllers
OttawaJS: angular accessibility
AngularJS $Provide Service
Introducing AngularJS
Canjs
Different way to share data between controllers in angular js
Codeigniter : Custom Routing - Manipulate Uri
AngularJS $http Interceptors (Explanation and Examples)
Ad

Viewers also liked (20)

PPTX
Ui router extras - AngularMN - Feb 2015
PPTX
Angular js
PDF
Angular 2 Routing
PDF
Práctica para writer
PPTX
Sms pro - bulk SMS sending software
PPT
Web Config
PDF
Story planner
PPT
Test Driven Development
PPTX
TDD - Test Driven Development
PPT
ASP .net MVC
PPTX
Building single page applications
PPT
Single Page Application presentation
PPTX
Single Page Application (SPA) using AngularJS
PDF
MS-SQL SERVER ARCHITECTURE
PDF
Test Driven Development (TDD)
PDF
Getting Started with Angular 2
PDF
29 Essential AngularJS Interview Questions
PDF
2015 Upload Campaigns Calendar - SlideShare
PPTX
What to Upload to SlideShare
PDF
How to Make Awesome SlideShares: Tips & Tricks
Ui router extras - AngularMN - Feb 2015
Angular js
Angular 2 Routing
Práctica para writer
Sms pro - bulk SMS sending software
Web Config
Story planner
Test Driven Development
TDD - Test Driven Development
ASP .net MVC
Building single page applications
Single Page Application presentation
Single Page Application (SPA) using AngularJS
MS-SQL SERVER ARCHITECTURE
Test Driven Development (TDD)
Getting Started with Angular 2
29 Essential AngularJS Interview Questions
2015 Upload Campaigns Calendar - SlideShare
What to Upload to SlideShare
How to Make Awesome SlideShares: Tips & Tricks
Ad

Similar to Dive into AngularJS Routing (20)

PDF
Introducing Rendr: Run your Backbone.js apps on the client and server
PDF
Angular meetup - routing and multilingual urls
PDF
Introduction of angular js
PDF
A Story about AngularJS modularization development
PDF
Angular 2: Migration - SSD 2016 London
PPTX
Angularjs rounting part 04
PPTX
Angular 2.0: Getting ready
PPTX
Angular-meteor with ionic
PDF
Advanced RESTful Rails
PDF
Advanced RESTful Rails
PDF
Workshop 13: AngularJS Parte II
ODP
Backbone js
PDF
ParisJS #10 : RequireJS
PDF
Laravel Routing and Query Building
PPTX
ngNewRouter
PPTX
Angular JS
PPTX
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
PDF
SF Cordova Meetup
PDF
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...
DOCX
Understanding angular js $rootscope and $scope
Introducing Rendr: Run your Backbone.js apps on the client and server
Angular meetup - routing and multilingual urls
Introduction of angular js
A Story about AngularJS modularization development
Angular 2: Migration - SSD 2016 London
Angularjs rounting part 04
Angular 2.0: Getting ready
Angular-meteor with ionic
Advanced RESTful Rails
Advanced RESTful Rails
Workshop 13: AngularJS Parte II
Backbone js
ParisJS #10 : RequireJS
Laravel Routing and Query Building
ngNewRouter
Angular JS
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
SF Cordova Meetup
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...
Understanding angular js $rootscope and $scope

Recently uploaded (20)

PPTX
Welding lecture in detail for understanding
PPTX
additive manufacturing of ss316l using mig welding
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
Digital Logic Computer Design lecture notes
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
Sustainable Sites - Green Building Construction
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
Geodesy 1.pptx...............................................
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
PPT on Performance Review to get promotions
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Welding lecture in detail for understanding
additive manufacturing of ss316l using mig welding
Foundation to blockchain - A guide to Blockchain Tech
Digital Logic Computer Design lecture notes
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Sustainable Sites - Green Building Construction
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Geodesy 1.pptx...............................................
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Internet of Things (IOT) - A guide to understanding
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPT on Performance Review to get promotions
UNIT-1 - COAL BASED THERMAL POWER PLANTS
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
CH1 Production IntroductoryConcepts.pptx
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx

Dive into AngularJS Routing