Skip to content

AngularJS Routing Example

Able Alias edited this page Jul 10, 2017 · 2 revisions
var angularFormsApp = angular.module('angularFormsApp',["ngRoute"]);
angularFormsApp.config(function ($routeProvider){
	$routeProvider
		.when("/home",{
			templateUrl: "app/Home.html",
			controller: "HomeController"
		})
		.when("/newEmployeeForm",{
			templateUrl: "app/EmployeeForm/efTemplate.html",
			controller: "efController"			
		})
		.otherwise({
			redirectTo: "/home"
		});
});

Clone this wiki locally