Skip to content

Instantly share code, notes, and snippets.

@sivaprasadreddy
Created September 5, 2014 12:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sivaprasadreddy/9b35955454f750ed7911 to your computer and use it in GitHub Desktop.
Save sivaprasadreddy/9b35955454f750ed7911 to your computer and use it in GitHub Desktop.
app-1.js
var myApp = angular.module('myApp',['ngRoute']);
myApp.config(['$routeProvider','$locationProvider',
function($routeProvider, $locationProvider) {
$routeProvider
.when('/home', {
templateUrl: 'templates/home.html',
controller: 'HomeController'
})
.when('/contacts', {
templateUrl: 'templates/contacts.html',
controller: 'ContactController'
})
.when('/todos', {
templateUrl: 'templates/todos.html',
controller: 'TodoController'
})
.otherwise({
redirectTo: 'home'
});
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment