@@ -158,11 +158,11 @@ app.run(runBlock);
158
158
159
159
let router : UIRouter = null ;
160
160
161
- ng1UIRouter . $inject = [ '$locationProvider' ] ;
161
+ $uiRouter . $inject = [ '$locationProvider' ] ;
162
162
/** This angular 1 provider instantiates a Router and exposes its services via the angular injector */
163
- function ng1UIRouter ( $locationProvider ) {
163
+ function $uiRouter ( $locationProvider ) {
164
164
165
- // Create a new instance of the Router when the ng1UIRouterProvider is initialized
165
+ // Create a new instance of the Router when the $uiRouterProvider is initialized
166
166
router = new UIRouter ( ) ;
167
167
168
168
// Apply ng1 specific StateBuilder code for `views`, `resolve`, and `onExit/Retain/Enter` properties
@@ -211,17 +211,17 @@ function ng1UIRouter($locationProvider) {
211
211
}
212
212
}
213
213
214
- function $stateParamsFactory ( ng1UIRouter ) {
215
- return ng1UIRouter . globals . params ;
214
+ function $stateParamsFactory ( $uiRouter ) {
215
+ return $uiRouter . globals . params ;
216
216
}
217
217
218
218
// The 'ui.router' ng1 module depends on 'ui.router.init' module.
219
- angular . module ( 'ui.router.init' , [ ] ) . provider ( "ng1UIRouter " , < any > ng1UIRouter ) ;
219
+ angular . module ( 'ui.router.init' , [ ] ) . provider ( "$uiRouter " , < any > $uiRouter ) ;
220
220
// This effectively calls $get() to init when we enter runtime
221
- angular . module ( 'ui.router.init' ) . run ( [ 'ng1UIRouter ' , function ( ng1UIRouter ) { } ] ) ;
221
+ angular . module ( 'ui.router.init' ) . run ( [ '$uiRouter ' , function ( $uiRouter ) { } ] ) ;
222
222
223
223
// $urlMatcherFactory service and $urlMatcherFactoryProvider
224
- angular . module ( 'ui.router.util' ) . provider ( '$urlMatcherFactory' , [ 'ng1UIRouterProvider ' , ( ) => router . urlMatcherFactory ] ) ;
224
+ angular . module ( 'ui.router.util' ) . provider ( '$urlMatcherFactory' , [ '$uiRouterProvider ' , ( ) => router . urlMatcherFactory ] ) ;
225
225
angular . module ( 'ui.router.util' ) . run ( [ '$urlMatcherFactory' , function ( $urlMatcherFactory ) { } ] ) ;
226
226
227
227
// $urlRouter service and $urlRouterProvider
@@ -233,7 +233,7 @@ function getUrlRouterProvider() {
233
233
} ;
234
234
return router . urlRouterProvider ;
235
235
}
236
- angular . module ( 'ui.router.router' ) . provider ( '$urlRouter' , [ 'ng1UIRouterProvider ' , getUrlRouterProvider ] ) ;
236
+ angular . module ( 'ui.router.router' ) . provider ( '$urlRouter' , [ '$uiRouterProvider ' , getUrlRouterProvider ] ) ;
237
237
angular . module ( 'ui.router.router' ) . run ( [ '$urlRouter' , function ( $urlRouter ) { } ] ) ;
238
238
239
239
// $state service and $stateProvider
@@ -246,22 +246,22 @@ function getStateProvider() {
246
246
} ;
247
247
return router . stateProvider ;
248
248
}
249
- angular . module ( 'ui.router.state' ) . provider ( '$state' , [ 'ng1UIRouterProvider ' , getStateProvider ] ) ;
249
+ angular . module ( 'ui.router.state' ) . provider ( '$state' , [ '$uiRouterProvider ' , getStateProvider ] ) ;
250
250
angular . module ( 'ui.router.state' ) . run ( [ '$state' , function ( $state ) { } ] ) ;
251
251
252
252
// $stateParams service
253
- angular . module ( 'ui.router.state' ) . factory ( '$stateParams' , [ 'ng1UIRouter ' , ( ng1UIRouter ) =>
254
- ng1UIRouter . globals . params ] ) ;
253
+ angular . module ( 'ui.router.state' ) . factory ( '$stateParams' , [ '$uiRouter ' , ( $uiRouter ) =>
254
+ $uiRouter . globals . params ] ) ;
255
255
256
256
// $transitions service and $transitionsProvider
257
257
function getTransitionsProvider ( ) {
258
258
router . transitionService [ "$get" ] = ( ) => router . transitionService ;
259
259
return router . transitionService ;
260
260
}
261
- angular . module ( 'ui.router.state' ) . provider ( '$transitions' , [ 'ng1UIRouterProvider ' , getTransitionsProvider ] ) ;
261
+ angular . module ( 'ui.router.state' ) . provider ( '$transitions' , [ '$uiRouterProvider ' , getTransitionsProvider ] ) ;
262
262
263
263
// $templateFactory service
264
- angular . module ( 'ui.router.util' ) . factory ( '$templateFactory' , [ 'ng1UIRouter ' , ( ) => new TemplateFactory ( ) ] ) ;
264
+ angular . module ( 'ui.router.util' ) . factory ( '$templateFactory' , [ '$uiRouter ' , ( ) => new TemplateFactory ( ) ] ) ;
265
265
266
266
// The $view service
267
267
angular . module ( 'ui.router' ) . factory ( '$view' , ( ) => router . viewService ) ;
0 commit comments