This repository was archived by the owner on Feb 18, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +12
-8
lines changed
snippets/angularjs/ngRoute Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -1530,8 +1530,9 @@ function configureRoutes(\$routeProvider) {
1530
1530
.when (
1531
1531
' /${1:route}' ,
1532
1532
{
1533
- controller: ' ${2:ControllerName}Ctrl' ,
1534
- templateUrl: ' ${3:app}/${4:module}/${5:template}.html'
1533
+ templateUrl : ' ${3:app}/${4:module}/${5:template}.html' ,
1534
+ controller : ' ${2:ControllerName}Ctrl' ,
1535
+ controllerAs : ' ${6:vm}'
1535
1536
}
1536
1537
)$0;
1537
1538
@@ -1550,8 +1551,9 @@ function configureRoutes(\$routeProvider) {
1550
1551
when (
1551
1552
' /${1:route}' ,
1552
1553
{
1553
- controller: ' ${2:ControllerName}Ctrl' ,
1554
- templateUrl: ' ${3:app}/${4:module}/${5:template}.html'
1554
+ templateUrl : ' ${3:app}/${4:module}/${5:template}.html' ,
1555
+ controller : ' ${2:ControllerName}Ctrl' ,
1556
+ controllerAs : ' ${6:vm}'
1555
1557
}
1556
1558
)$0
1557
1559
` ` `
Original file line number Diff line number Diff line change @@ -14,8 +14,9 @@ function configureRoutes(\$routeProvider) {
14
14
.when(
15
15
'/${1:route}',
16
16
{
17
- controller: '${2:ControllerName}Ctrl',
18
- templateUrl: '${3:app}/${4:module}/${5:template}.html'
17
+ templateUrl : '${3:app}/${4:module}/${5:template}.html',
18
+ controller : '${2:ControllerName}Ctrl',
19
+ controllerAs : '${6:vm}'
19
20
}
20
21
)$0;
21
22
Original file line number Diff line number Diff line change 3
3
when(
4
4
'/${1:route}',
5
5
{
6
- controller: '${2:ControllerName}Ctrl',
7
- templateUrl: '${3:app}/${4:module}/${5:template}.html'
6
+ templateUrl : '${3:app}/${4:module}/${5:template}.html',
7
+ controller : '${2:ControllerName}Ctrl',
8
+ controllerAs : '${6:vm}'
8
9
}
9
10
)$0
10
11
]]> </content >
You can’t perform that action at this time.
0 commit comments