Created
June 12, 2016 08:30
-
-
Save Guvenir/f9020bd30734accbd21ca5a1de05af16 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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