Lint fixes
This commit is contained in:
@@ -105,7 +105,7 @@ export class LayoutService {
|
||||
|
||||
changeTheme() {
|
||||
const config = this.config();
|
||||
const themeLink = <HTMLLinkElement>document.getElementById('theme-css');
|
||||
const themeLink = document.getElementById('theme-css') as HTMLLinkElement;
|
||||
const themeLinkHref = themeLink.getAttribute('href')!;
|
||||
const newHref = themeLinkHref
|
||||
.split('/')
|
||||
@@ -122,8 +122,8 @@ export class LayoutService {
|
||||
}
|
||||
replaceThemeLink(href: string) {
|
||||
const id = 'theme-css';
|
||||
let themeLink = <HTMLLinkElement>document.getElementById(id);
|
||||
const cloneLinkElement = <HTMLLinkElement>themeLink.cloneNode(true);
|
||||
const themeLink = document.getElementById(id) as HTMLLinkElement;
|
||||
const cloneLinkElement = themeLink.cloneNode(true) as HTMLLinkElement;
|
||||
|
||||
cloneLinkElement.setAttribute('href', href);
|
||||
cloneLinkElement.setAttribute('id', id + '-clone');
|
||||
|
||||
@@ -116,7 +116,7 @@ export class AppMenuitemComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
updateActiveStateFromRoute() {
|
||||
let activeRoute = this.router.isActive(this.item.routerLink[0], {
|
||||
const activeRoute = this.router.isActive(this.item.routerLink[0], {
|
||||
paths: 'exact',
|
||||
queryParams: 'ignored',
|
||||
matrixParams: 'ignored',
|
||||
|
||||
+3
-5
@@ -1,5 +1,5 @@
|
||||
import {CommonModule, isPlatformBrowser} from '@angular/common';
|
||||
import {Component, computed, inject, PLATFORM_ID} from '@angular/core';
|
||||
import {Component, computed, inject, PLATFORM_ID, OnInit} from '@angular/core';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {$t, updatePreset, updateSurfacePalette} from '@primeng/themes';
|
||||
import Aura from '@primeng/themes/aura';
|
||||
@@ -14,9 +14,7 @@ import {SelectButton} from 'primeng/selectbutton';
|
||||
import {ToggleSwitchModule} from 'primeng/toggleswitch';
|
||||
import {AppConfigService} from '../../../core/service/app-config.service';
|
||||
|
||||
interface ColorPalette {
|
||||
[key: string]: string;
|
||||
}
|
||||
type ColorPalette = Record<string, string>;
|
||||
|
||||
interface Palette {
|
||||
name: string;
|
||||
@@ -39,7 +37,7 @@ const presets = {
|
||||
},
|
||||
imports: [CommonModule, FormsModule, InputSwitchModule, ButtonModule, RadioButtonModule, SelectButton, ToggleSwitchModule]
|
||||
})
|
||||
export class ThemeConfiguratorComponent {
|
||||
export class ThemeConfiguratorComponent implements OnInit {
|
||||
|
||||
get ripple() {
|
||||
return this.config.ripple();
|
||||
|
||||
Reference in New Issue
Block a user