Created
May 31, 2018 01:10
-
-
Save xaiwant/b55b46d3d573837b5afa7fa9a71cf6ba 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 myApp = angular.module("myApp", ["ngRoute"]); | |
myApp.config(function($routeProvider) { | |
$routeProvider | |
.when("/about", { | |
template: '<p>Angular Page with route</p>' | |
}) | |
.when("/careers", { | |
templateUrl : "careers.htm" | |
}) | |
.when("/career", { | |
templateUrl : "career.htm", | |
controller: 'routecntrl' | |
}) | |
}); | |
myApp.controller('routecntrl', function($scope) { | |
$scope.result = "Welcome to AngularJS Application with routes technique with templateUrl parameter."; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment