Skip to content

Commit dfa0eae

Browse files
chore(tslint): object-curly-spacing
1 parent c52b076 commit dfa0eae

File tree

9 files changed

+37
-37
lines changed

9 files changed

+37
-37
lines changed

src/directives/directives.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
* @preferred
1010
* @module directives
1111
*/ /** */
12-
import {UISref, AnchorUISref} from './uiSref';
13-
import {UISrefActive} from './uiSrefActive';
14-
import {UIView} from './uiView';
15-
import {UISrefStatus} from './uiSrefStatus';
12+
import { UISref, AnchorUISref } from './uiSref';
13+
import { UISrefActive } from './uiSrefActive';
14+
import { UIView } from './uiView';
15+
import { UISrefStatus } from './uiSrefStatus';
1616

1717
export * from './uiView';
1818
export * from './uiSref';

src/directives/uiSrefActive.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** @ng2api @module directives */ /** */
2-
import {Directive, Input, ElementRef, Host, Renderer} from '@angular/core';
3-
import {UISrefStatus, SrefStatus} from './uiSrefStatus';
4-
import {Subscription} from 'rxjs/Subscription';
2+
import { Directive, Input, ElementRef, Host, Renderer } from '@angular/core';
3+
import { UISrefStatus, SrefStatus } from './uiSrefStatus';
4+
import { Subscription } from 'rxjs/Subscription';
55

66
/**
77
* A directive that adds a CSS class when its associated `uiSref` link is active.

src/directives/uiSrefStatus.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import { Subscription } from 'rxjs/Subscription';
1010
import { Observable } from 'rxjs/Observable';
1111
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
1212

13-
import {of} from 'rxjs/observable/of';
14-
import {fromPromise} from 'rxjs/observable/fromPromise';
15-
import {combineLatest} from 'rxjs/observable/combineLatest';
16-
import {switchMap} from 'rxjs/operator/switchMap';
17-
import {map} from 'rxjs/operator/map';
18-
import {concat} from 'rxjs/operator/concat';
13+
import { of } from 'rxjs/observable/of';
14+
import { fromPromise } from 'rxjs/observable/fromPromise';
15+
import { combineLatest } from 'rxjs/observable/combineLatest';
16+
import { switchMap } from 'rxjs/operator/switchMap';
17+
import { map } from 'rxjs/operator/map';
18+
import { concat } from 'rxjs/operator/concat';
1919

2020
/** @internalapi */
2121
interface TransEvt { evt: string; trans: Transition; }
@@ -191,7 +191,7 @@ export class UISrefStatus {
191191
/** current statuses of the state/params the uiSref directive is linking to */
192192
@Output('uiSrefStatus') uiSrefStatus = new EventEmitter<SrefStatus>(false);
193193
/** Monitor all child components for UISref(s) */
194-
@ContentChildren(UISref, {descendants: true}) private _srefs: QueryList<UISref>;
194+
@ContentChildren(UISref, { descendants: true }) private _srefs: QueryList<UISref>;
195195

196196
/** The current status */
197197
status: SrefStatus;
@@ -209,7 +209,7 @@ export class UISrefStatus {
209209
// Map each transition start event to a stream of:
210210
// start -> (success|error)
211211
const transEvents$: Observable<TransEvt> = switchMap.call(this._globals.start$, (trans: Transition) => {
212-
const event = (evt: string) => ({evt, trans} as TransEvt);
212+
const event = (evt: string) => ({ evt, trans } as TransEvt);
213213

214214
const transStart$ = of(event('start'));
215215
const transResult = trans.promise.then(() => event('success'), () => event('error'));

src/directives/uiView.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const ng2ComponentInputs = (factory: ComponentFactory<any>): InputMapping[] => {
9696
export class UIView {
9797
static PARENT_INJECT = 'UIView.PARENT_INJECT';
9898

99-
@ViewChild('componentTarget', {read: ViewContainerRef}) _componentTarget: ViewContainerRef;
99+
@ViewChild('componentTarget', { read: ViewContainerRef }) _componentTarget: ViewContainerRef;
100100
@Input('name') name: string;
101101
@Input('ui-view') set _name(val: string) { this.name = val; }
102102
/** The reference to the component currently inside the viewport */

src/mergeInjector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/** @module ng2 */ /** */
2-
import {Injector} from '@angular/core';
2+
import { Injector } from '@angular/core';
33

44
/**
55
* Merge two injectors

src/providers.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export function parentUIViewInjectFactory(r: StateRegistry) { return { fqn: null
171171

172172
export const _UIROUTER_INSTANCE_PROVIDERS: Provider[] = [
173173
{ provide: UIRouter, useFactory: uiRouterFactory, deps: [LocationStrategy, UIROUTER_ROOT_MODULE, UIROUTER_MODULE_TOKEN, Injector] },
174-
{ provide: UIView.PARENT_INJECT, useFactory: parentUIViewInjectFactory, deps: [StateRegistry]},
174+
{ provide: UIView.PARENT_INJECT, useFactory: parentUIViewInjectFactory, deps: [StateRegistry] },
175175
{ provide: APP_INITIALIZER, useFactory: appInitializer, deps: [UIRouter], multi: true },
176176
];
177177

@@ -185,14 +185,14 @@ export function fnStateRegistry(r: UIRouter) { return r.stateRegistry; }
185185
export function fnGlobals(r: any) { return r.globals; }
186186

187187
export const _UIROUTER_SERVICE_PROVIDERS: Provider[] = [
188-
{ provide: StateService, useFactory: fnStateService, deps: [UIRouter]},
189-
{ provide: TransitionService, useFactory: fnTransitionService, deps: [UIRouter]},
190-
{ provide: UrlMatcherFactory, useFactory: fnUrlMatcherFactory, deps: [UIRouter]},
191-
{ provide: UrlRouter, useFactory: fnUrlRouter, deps: [UIRouter]},
192-
{ provide: UrlService, useFactory: fnUrlService, deps: [UIRouter]},
193-
{ provide: ViewService, useFactory: fnViewService, deps: [UIRouter]},
194-
{ provide: StateRegistry, useFactory: fnStateRegistry, deps: [UIRouter]},
195-
{ provide: UIRouterGlobals, useFactory: fnGlobals, deps: [UIRouter]},
188+
{ provide: StateService, useFactory: fnStateService, deps: [UIRouter] },
189+
{ provide: TransitionService, useFactory: fnTransitionService, deps: [UIRouter] },
190+
{ provide: UrlMatcherFactory, useFactory: fnUrlMatcherFactory, deps: [UIRouter] },
191+
{ provide: UrlRouter, useFactory: fnUrlRouter, deps: [UIRouter] },
192+
{ provide: UrlService, useFactory: fnUrlService, deps: [UIRouter] },
193+
{ provide: ViewService, useFactory: fnViewService, deps: [UIRouter] },
194+
{ provide: StateRegistry, useFactory: fnStateRegistry, deps: [UIRouter] },
195+
{ provide: UIRouterGlobals, useFactory: fnGlobals, deps: [UIRouter] },
196196
];
197197

198198
/**

src/statebuilders/views.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/** @module ng2 */ /** */
22
import { isFunction, StateObject } from '@uirouter/core';
3-
import {PathNode} from '@uirouter/core';
4-
import {pick, forEach} from '@uirouter/core';
5-
import {ViewConfig} from '@uirouter/core';
6-
import {Ng2ViewDeclaration} from '../interface';
7-
import {services} from '@uirouter/core';
8-
import {ViewService} from '@uirouter/core';
3+
import { PathNode } from '@uirouter/core';
4+
import { pick, forEach } from '@uirouter/core';
5+
import { ViewConfig } from '@uirouter/core';
6+
import { Ng2ViewDeclaration } from '../interface';
7+
import { services } from '@uirouter/core';
8+
import { ViewService } from '@uirouter/core';
99

1010
/**
1111
* This is a [[StateBuilder.builder]] function for Angular `views`.
@@ -18,7 +18,7 @@ import {ViewService} from '@uirouter/core';
1818
*/
1919
export function ng2ViewsBuilder(state: StateObject) {
2020
const views: { [key: string]: Ng2ViewDeclaration } = {},
21-
viewsObject = state.views || {'$default': pick(state, ['component', 'bindings'])};
21+
viewsObject = state.views || { '$default': pick(state, ['component', 'bindings']) };
2222

2323
forEach(viewsObject, function (config: Ng2ViewDeclaration, name: string) {
2424
name = name || '$default'; // Account for views: { "": { template... } }

src/uiRouterConfig.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/** @module ng2 */ /** */
22
import { UIRouter, isFunction, StateObject } from '@uirouter/core';
3-
import {StatesModule, RootModule} from './uiRouterNgModule';
4-
import {Injector} from '@angular/core';
5-
import {isDefined} from '@uirouter/core';
3+
import { StatesModule, RootModule } from './uiRouterNgModule';
4+
import { Injector } from '@angular/core';
5+
import { isDefined } from '@uirouter/core';
66

77
export function applyModuleConfig(uiRouter: UIRouter, injector: Injector, module: StatesModule = {}): StateObject[] {
88
if (isFunction(module.config)) {

src/uiRouterNgModule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function onTransitionReady(transitionService: TransitionService, root: Ro
3232

3333
export function makeRootProviders(module: RootModule): Provider[] {
3434
return [
35-
{ provide: UIROUTER_ROOT_MODULE, useValue: module, multi: true},
35+
{ provide: UIROUTER_ROOT_MODULE, useValue: module, multi: true },
3636
{ provide: UIROUTER_MODULE_TOKEN, useValue: module, multi: true },
3737
{ provide: ROUTES, useValue: module.states || [], multi: true },
3838
{ provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: module.states || [], multi: true },

0 commit comments

Comments
 (0)