style: eslint of member-ordering

This commit is contained in:
禾几海
2021-03-12 16:48:27 +08:00
parent 2037c95ffd
commit 7ea7f83227
20 changed files with 122 additions and 107 deletions

View File

@@ -1,17 +1,12 @@
import {Injectable} from '@angular/core';
import {filter} from 'rxjs/operators';
import {NavigationEnd, Router, RouterEvent} from '@angular/router';
import {Observable, of, Subscriber} from 'rxjs';
import {Observable, Subscriber} from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class ComponentStateService {
constructor(private router: Router) {
this.watchRouterChange();
}
visible = {
header: true,
footer: true,
@@ -19,6 +14,12 @@ export class ComponentStateService {
};
currentPath: string;
constructor(private router: Router) {
this.watchRouterChange();
}
getCurrentRouterPath = () => this.currentPath;
watchRouterChange() {
@@ -33,7 +34,9 @@ export class ComponentStateService {
const prefix = path.substr(0, indexOf === 0 ? path.length : indexOf);
this.dealWithPathChange(prefix);
this.currentPath = prefix;
if (subscriber) {subscriber.next(prefix);}
if (subscriber) {
subscriber.next(prefix);
}
});
return ob;
}