3
3
*
4
4
* - Provides an implementation for the [[CoreServices]] API, based on angular 1 services.
5
5
* - Also registers some services with the angular 1 injector.
6
- * - Creates and bootstraps a new [[UiRouter ]] object. Ties it to the the angular 1 lifecycle.
6
+ * - Creates and bootstraps a new [[UIRouter ]] object. Ties it to the the angular 1 lifecycle.
7
7
*
8
8
* @module ng1
9
9
* @preferred
10
10
*/
11
11
12
12
/** for typedoc */
13
- import { UiRouter } from "../router" ;
13
+ import { UIRouter } from "../router" ;
14
14
import { services } from "../common/coreservices" ;
15
15
import { bindFunctions , removeFrom , applyPairs } from "../common/common" ;
16
16
import { prop } from "../common/hof" ;
@@ -156,14 +156,14 @@ function runBlock($injector, $q) {
156
156
157
157
app . run ( runBlock ) ;
158
158
159
- let router : UiRouter = null ;
159
+ let router : UIRouter = null ;
160
160
161
- ng1UiRouter . $inject = [ '$locationProvider' ] ;
161
+ ng1UIRouter . $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 ng1UIRouter ( $locationProvider ) {
164
164
165
- // Create a new instance of the Router when the ng1UiRouterProvider is initialized
166
- router = new UiRouter ( ) ;
165
+ // Create a new instance of the Router when the ng1UIRouterProvider is initialized
166
+ router = new UIRouter ( ) ;
167
167
168
168
// Apply ng1 specific StateBuilder code for `views`, `resolve`, and `onExit/Retain/Enter` properties
169
169
router . stateRegistry . decorator ( "views" , ng1ViewsBuilder ) ;
@@ -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 ( ng1UIRouter ) {
215
+ return ng1UIRouter . 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 ( "ng1UIRouter " , < any > ng1UIRouter ) ;
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 ( [ 'ng1UIRouter ' , function ( ng1UIRouter ) { } ] ) ;
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' , [ 'ng1UIRouterProvider ' , ( ) => 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' , [ 'ng1UIRouterProvider ' , 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' , [ 'ng1UIRouterProvider ' , 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' , [ 'ng1UIRouter ' , ( ng1UIRouter ) =>
254
+ ng1UIRouter . 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' , [ 'ng1UIRouterProvider ' , 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' , [ 'ng1UIRouter ' , ( ) => new TemplateFactory ( ) ] ) ;
265
265
266
266
// The $view service
267
267
angular . module ( 'ui.router' ) . factory ( '$view' , ( ) => router . viewService ) ;
@@ -283,16 +283,16 @@ export const getLocals = (ctx: ResolveContext) => {
283
283
return tuples . reduce ( applyPairs , { } ) ;
284
284
} ;
285
285
286
- /** Adds the angular 1 `$injector` to the `UiInjector ` interface */
286
+ /** Adds the angular 1 `$injector` to the `UIInjector ` interface */
287
287
declare module "../common/interface" {
288
288
/**
289
- * This enhances the [[common.UiInjector ]] interface by adding the `$injector` service as the [[native]] injector.
289
+ * This enhances the [[common.UIInjector ]] interface by adding the `$injector` service as the [[native]] injector.
290
290
*/
291
- interface UiInjector {
291
+ interface UIInjector {
292
292
/**
293
293
* The native Angular 1 `$injector` service
294
294
*
295
- * When you have access to a `UiInjector `, this property will contain the native `$injector` Angular 1 service.
295
+ * When you have access to a `UIInjector `, this property will contain the native `$injector` Angular 1 service.
296
296
*
297
297
* @example :
298
298
* ```js
0 commit comments