Skip to content

Instantly share code, notes, and snippets.

@Guvenir
Created June 12, 2016 08:30
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 Guvenir/f9020bd30734accbd21ca5a1de05af16 to your computer and use it in GitHub Desktop.
Save Guvenir/f9020bd30734accbd21ca5a1de05af16 to your computer and use it in GitHub Desktop.
var module = angular.module("sampleApp", ['ngRoute']);
module.config(['$routeProvider', '$locationProvider',
function($routeProvider, $locationProvider) {
$routeProvider.
when('/route1', {
templateUrl: 'pages/about.html',
controller: 'RouteController'
}).
when('/route2', {
templateUrl: 'pages/showcase.html',
controller: 'RouteController2'
}).
otherwise({
redirectTo: '/index'
});
$locationProvider.html5Mode(true);
}]);
module.controller("RouteController", function($scope) {
});
module.controller("RouteController", function($scope) {
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment