-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
32 lines (25 loc) · 920 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// app.js
var app = angular.module('personalApp', ['ui.router'])
.config(function($stateProvider, $urlRouterProvider) {
// create a default rule
$urlRouterProvider.otherwise('/nav/home');
$stateProvider
.state('nav',{
url:'/nav',
templateUrl:'templates/nav/nav.html',
controller:'navController as nContr'
//abstract:true // make sure there is always something in there
})
.state('nav.home', {
parent:'nav',
url:'/home',
templateUrl:'templates/home/home.html',
controller:'homeController as hContr' // for now best way to use controller as syntax
})
.state('nav.projects', {
parent:'nav',
url:'/projects',
templateUrl:'templates/projects/projects.html',
controller:'projectsController as pContr'
});
});