style(lint): re-format modules/@angular
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import {RouterOutlet} from "./router_outlet";
|
||||
import {RouterLink} from "./router_link";
|
||||
import {RouterLink} from './router_link';
|
||||
import {RouterOutlet} from './router_outlet';
|
||||
|
||||
/**
|
||||
* A list of directives. To use the router directives like {@link RouterOutlet} and
|
||||
|
@ -1,9 +1,11 @@
|
||||
import {Directive, HostListener, HostBinding, Input, OnDestroy} from '@angular/core';
|
||||
import {LocationStrategy} from '@angular/common';
|
||||
import {Directive, HostBinding, HostListener, Input, OnDestroy} from '@angular/core';
|
||||
|
||||
import {ObservableWrapper} from '../facade/async';
|
||||
import {isArray, isPresent, isString} from '../facade/lang';
|
||||
import {Router} from '../router';
|
||||
import {RouteSegment} from '../segments';
|
||||
import {isString, isArray, isPresent} from '../facade/lang';
|
||||
import {ObservableWrapper} from '../facade/async';
|
||||
import {LocationStrategy} from '@angular/common';
|
||||
|
||||
|
||||
/**
|
||||
* The RouterLink directive lets you link to specific parts of your app.
|
||||
@ -45,8 +47,9 @@ export class RouterLink implements OnDestroy {
|
||||
@HostBinding() href: string;
|
||||
@HostBinding('class.router-link-active') isActive: boolean = false;
|
||||
|
||||
constructor(private _routeSegment: RouteSegment, private _router: Router,
|
||||
private _locationStrategy: LocationStrategy) {
|
||||
constructor(
|
||||
private _routeSegment: RouteSegment, private _router: Router,
|
||||
private _locationStrategy: LocationStrategy) {
|
||||
// because auxiliary links take existing primary and auxiliary routes into account,
|
||||
// we need to update the link whenever params or other routes change.
|
||||
this._subscription =
|
||||
@ -56,7 +59,7 @@ export class RouterLink implements OnDestroy {
|
||||
ngOnDestroy() { ObservableWrapper.dispose(this._subscription); }
|
||||
|
||||
@Input()
|
||||
set routerLink(data: any[] | any) {
|
||||
set routerLink(data: any[]|any) {
|
||||
if (isArray(data)) {
|
||||
this._commands = <any[]>data;
|
||||
} else {
|
||||
@ -66,7 +69,7 @@ export class RouterLink implements OnDestroy {
|
||||
}
|
||||
|
||||
|
||||
@HostListener("click", ["$event.button", "$event.ctrlKey", "$event.metaKey"])
|
||||
@HostListener('click', ['$event.button', '$event.ctrlKey', '$event.metaKey'])
|
||||
onClick(button: number, ctrlKey: boolean, metaKey: boolean): boolean {
|
||||
if (button != 0 || ctrlKey || metaKey) {
|
||||
return true;
|
||||
|
@ -1,15 +1,9 @@
|
||||
import {
|
||||
ResolvedReflectiveProvider,
|
||||
Directive,
|
||||
ViewContainerRef,
|
||||
Attribute,
|
||||
ComponentRef,
|
||||
ComponentFactory,
|
||||
ReflectiveInjector
|
||||
} from '@angular/core';
|
||||
import {RouterOutletMap} from '../router';
|
||||
import {Attribute, ComponentFactory, ComponentRef, Directive, ReflectiveInjector, ResolvedReflectiveProvider, ViewContainerRef} from '@angular/core';
|
||||
|
||||
import {DEFAULT_OUTLET_NAME} from '../constants';
|
||||
import {isPresent, isBlank} from '../facade/lang';
|
||||
import {isBlank, isPresent} from '../facade/lang';
|
||||
import {RouterOutletMap} from '../router';
|
||||
|
||||
|
||||
/**
|
||||
* A router outlet is a placeholder that Angular dynamically fills based on the application's route.
|
||||
@ -31,8 +25,9 @@ export class RouterOutlet {
|
||||
private _activated: ComponentRef<any>;
|
||||
public outletMap: RouterOutletMap;
|
||||
|
||||
constructor(parentOutletMap: RouterOutletMap, private _location: ViewContainerRef,
|
||||
@Attribute('name') name: string) {
|
||||
constructor(
|
||||
parentOutletMap: RouterOutletMap, private _location: ViewContainerRef,
|
||||
@Attribute('name') name: string) {
|
||||
parentOutletMap.registerOutlet(isBlank(name) ? DEFAULT_OUTLET_NAME : name, this);
|
||||
}
|
||||
|
||||
@ -54,8 +49,9 @@ export class RouterOutlet {
|
||||
/**
|
||||
* Called by the Router to instantiate a new component.
|
||||
*/
|
||||
activate(factory: ComponentFactory<any>, providers: ResolvedReflectiveProvider[],
|
||||
outletMap: RouterOutletMap): ComponentRef<any> {
|
||||
activate(
|
||||
factory: ComponentFactory<any>, providers: ResolvedReflectiveProvider[],
|
||||
outletMap: RouterOutletMap): ComponentRef<any> {
|
||||
this.outletMap = outletMap;
|
||||
let inj = ReflectiveInjector.fromResolvedProviders(providers, this._location.parentInjector);
|
||||
this._activated = this._location.createComponent(factory, this._location.length, inj, []);
|
||||
|
Reference in New Issue
Block a user