Skip to content
This repository was archived by the owner on Feb 18, 2021. It is now read-only.

Commit 0588946

Browse files
committed
ngRoute snippets updated
1 parent fc657ff commit 0588946

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,8 +1530,9 @@ function configureRoutes(\$routeProvider) {
15301530
.when(
15311531
'/${1:route}',
15321532
{
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}'
15351536
}
15361537
)$0;
15371538

@@ -1550,8 +1551,9 @@ function configureRoutes(\$routeProvider) {
15501551
when(
15511552
'/${1:route}',
15521553
{
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}'
15551557
}
15561558
)$0
15571559
```

snippets/angularjs/ngRoute/routeProvider.configure.sublime-snippet

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ function configureRoutes(\$routeProvider) {
1414
.when(
1515
'/${1:route}',
1616
{
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}'
1920
}
2021
)$0;
2122

snippets/angularjs/ngRoute/routeProvider.when.sublime-snippet

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
when(
44
'/${1:route}',
55
{
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}'
89
}
910
)$0
1011
]]></content>

0 commit comments

Comments
 (0)