style(lint): re-format modules/@angular
This commit is contained in:
@ -1,10 +1,13 @@
|
||||
import {PlatformLocation, UrlChangeListener} from '@angular/common';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {History, Location} from '../../facade/browser';
|
||||
import {UrlChangeListener, PlatformLocation} from '@angular/common';
|
||||
|
||||
import {getDOM} from '../../dom/dom_adapter';
|
||||
import {History, Location} from '../../facade/browser';
|
||||
|
||||
import {supportsState} from './history';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* `PlatformLocation` encapsulates all of the direct calls to platform APIs.
|
||||
* This class should not be used directly by an application developer. Instead, use
|
||||
@ -46,7 +49,7 @@ export class BrowserPlatformLocation extends PlatformLocation {
|
||||
set pathname(newPath: string) { this._location.pathname = newPath; }
|
||||
|
||||
pushState(state: any, title: string, url: string): void {
|
||||
if(supportsState()) {
|
||||
if (supportsState()) {
|
||||
this._history.pushState(state, title, url);
|
||||
} else {
|
||||
this._location.hash = url;
|
||||
@ -54,7 +57,7 @@ export class BrowserPlatformLocation extends PlatformLocation {
|
||||
}
|
||||
|
||||
replaceState(state: any, title: string, url: string): void {
|
||||
if(supportsState()) {
|
||||
if (supportsState()) {
|
||||
this._history.replaceState(state, title, url);
|
||||
} else {
|
||||
this._location.hash = url;
|
||||
|
@ -1,3 +1,3 @@
|
||||
export function supportsState(): boolean {
|
||||
return !!window.history.pushState;
|
||||
return !!window.history.pushState;
|
||||
}
|
Reference in New Issue
Block a user