-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
73 lines (60 loc) · 2.08 KB
/
app.js
File metadata and controls
73 lines (60 loc) · 2.08 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
var routerApp = angular.module('routerApp', ['ui.router']);
routerApp.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/home');
$stateProvider
// HOME STATES AND NESTED VIEWS ========================================
.state('home', {
url: '/home',
templateUrl: 'partial-home.html'
})
// nested list with custom controller
.state('home.list', {
url: '/list',
templateUrl: 'partial-home-list.html',
controller: function($scope) {
$scope.prophets = ['Moses', 'Samuel', 'Elijah' , 'Elisha', 'Isaiah', 'Ezekiel', 'Daniel'];
}
})
// nested list with just some random string data
.state('home.paragraph', {
url: '/paragraph',
template: 'For God So Loved The World, That He Gave His Only Son, And That Whosoever Believes In Him Shall Not Perish, But Shall Have Eternal Life..'
})
// ABOUT PAGE AND MULTIPLE NAMED VIEWS =================================
.state('about', {
url: '/about',
views: {
'': { templateUrl: 'partial-about.html' },
'columnOne@about': { template: 'I am just a regular column!' },
'columnTwo@about': {
templateUrl: 'table-data.html',
controller: 'BibliaController'
}
}
});
});
routerApp.controller('BibliaController', function($scope) {
$scope.message = 'test';
$scope.biblias = [
{
name: 'Biblia Ya Kiswahili',
price: 2975
},
{
name: 'King James Version ',
price: 1850
},
{
name: 'New International Version ',
price: 2350
},
{
name: 'The Amplified Version ',
price: 1350
},
{
name: 'The Good News Bible ',
price: 20000
}
];
});