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

Commit b6f1ad6

Browse files
committed
uiRouter and ngRoute snippets updated
1 parent 0588946 commit b6f1ad6

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -982,12 +982,12 @@ ${2: \$urlRouterProvider
982982
url: '/$1',
983983
views: {
984984
'master': {
985-
templateUrl : 'app/main/templates/layout.html'
985+
templateUrl : 'app/main/templates/layout$3.html'
986986
},
987987
'content@$1': {
988-
templateUrl : 'app/$1/template.html',
988+
templateUrl : 'app/$1/${5:template}.html',
989989
controller : '${1/([A-Za-z0-9]+)?/(?2::\u$1)/g}Ctrl',
990-
controllerAs : 'vm'
990+
controllerAs : 'vm$4'
991991
}
992992
}
993993
})$0;
@@ -1027,7 +1027,7 @@ state('${1:name}.${2:substate}', {
10271027
```javascript
10281028
\$urlRouterProvider
10291029
.when('$1', '/$2')
1030-
.otherwise("/${3:404}")$0
1030+
.otherwise("/${3:redirectTo}")$0;
10311031
```
10321032
10331033
#### Angular UI Router: [when]
@@ -1532,7 +1532,7 @@ function configureRoutes(\$routeProvider) {
15321532
{
15331533
templateUrl : '${3:app}/${4:module}/${5:template}.html',
15341534
controller : '${2:ControllerName}Ctrl',
1535-
controllerAs : '${6:vm}'
1535+
controllerAs : 'vm$6'
15361536
}
15371537
)$0;
15381538

@@ -1553,7 +1553,7 @@ when(
15531553
{
15541554
templateUrl : '${3:app}/${4:module}/${5:template}.html',
15551555
controller : '${2:ControllerName}Ctrl',
1556-
controllerAs : '${6:vm}'
1556+
controllerAs : 'vm$6'
15571557
}
15581558
)$0
15591559
```

snippets/angular-ui/ui-router/stateProvider.configure.sublime-snippet

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ ${2: \$urlRouterProvider
2020
url: '/$1',
2121
views: {
2222
'master': {
23-
templateUrl : 'app/main/templates/layout.html'
23+
templateUrl : 'app/main/templates/layout$3.html'
2424
},
2525
'content@$1': {
26-
templateUrl : 'app/$1/template.html',
26+
templateUrl : 'app/$1/${5:template}.html',
2727
controller : '${1/([A-Za-z0-9]+)?/(?2::\u$1)/g}Ctrl',
28-
controllerAs : 'vm'
28+
controllerAs : 'vm$4'
2929
}
3030
}
3131
})$0;

snippets/angular-ui/ui-router/urlRouterProvider.configure.sublime-snippet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<content><![CDATA[
33
\$urlRouterProvider
44
.when('$1', '/$2')
5-
.otherwise("/${3:404}")$0;
5+
.otherwise("/${3:redirectTo}")$0;
66
]]></content>
77
<tabTrigger>urlRouterProvider</tabTrigger>
88
<scope>source.js</scope>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function configureRoutes(\$routeProvider) {
1616
{
1717
templateUrl : '${3:app}/${4:module}/${5:template}.html',
1818
controller : '${2:ControllerName}Ctrl',
19-
controllerAs : '${6:vm}'
19+
controllerAs : 'vm$6'
2020
}
2121
)$0;
2222

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ when(
55
{
66
templateUrl : '${3:app}/${4:module}/${5:template}.html',
77
controller : '${2:ControllerName}Ctrl',
8-
controllerAs : '${6:vm}'
8+
controllerAs : 'vm$6'
99
}
1010
)$0
1111
]]></content>

0 commit comments

Comments
 (0)