Skip to content

Instantly share code, notes, and snippets.

/app.js Secret
Created Dec 10, 2014

Embed
What would you like to do?
'use strict';
var app;
app = angular.module('blogApp', ['ngRoute', 'blogControllers']).config([
'$routeProvider', function($routeProvider) {
return $routeProvider.when('/posts', {
title: 'Home',
templateUrl: 'partials/posts-homepage.html',
controller: 'homePageCtrl'
}).when('/post/:id', {
title: 'Post',
templateUrl: 'partials/posts-view.html',
controller: 'postviewCtrl'
}).otherwise({
redirectTo: '/posts'
});
}
]).run([
'$location', '$rootScope', function($location, $rootScope) {
$rootScope.title = 'Home';
return $rootScope.$on('$routeChangeSuccess', function(event, current, previous) {
return $rootScope.title = current.$$route.title;
});
}
]);
//# sourceMappingURL=app.js.map
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.