Skip to content

Instantly share code, notes, and snippets.

@pankajpatel
Last active August 29, 2015 14:22
Show Gist options
  • Save pankajpatel/aff3363a43d906224af0 to your computer and use it in GitHub Desktop.
Save pankajpatel/aff3363a43d906224af0 to your computer and use it in GitHub Desktop.
Angular App with route configuration for Contact Store Application
var app = angular.module( 'contactApp', ['ngRoute'] );
app.config(['$routeProvider',
function($routeProvider) {
$routeProvider.
when('/contacts', {
templateUrl: 'partials/contacts.html',
controller: 'ContactsController'
}).
when('/contacts/:contactId', {
templateUrl: 'partials/contact.html',
controller: 'ContactController'
}).
otherwise({
redirectTo: '/contacts'
});
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment