mirror of
https://github.com/akveo/ngx-admin.git
synced 2026-03-01 11:20:16 +01:00
feat: update to Angular 6 (#1684)
This commit is contained in:
parent
fa3cdf731b
commit
06d2197583
18 changed files with 5448 additions and 4039 deletions
|
|
@ -1,4 +1,6 @@
|
|||
import { Component, OnDestroy } from '@angular/core';
|
||||
import { delay, withLatestFrom } from 'rxjs/operators';
|
||||
import { Subscription } from 'rxjs';
|
||||
import {
|
||||
NbMediaBreakpoint,
|
||||
NbMediaBreakpointsService,
|
||||
|
|
@ -10,10 +12,6 @@ import {
|
|||
|
||||
import { StateService } from '../../../@core/data/state.service';
|
||||
|
||||
import { Subscription } from 'rxjs/Subscription';
|
||||
import 'rxjs/add/operator/withLatestFrom';
|
||||
import 'rxjs/add/operator/delay';
|
||||
|
||||
// TODO: move layouts into the framework
|
||||
@Component({
|
||||
selector: 'ngx-sample-layout',
|
||||
|
|
@ -25,9 +23,9 @@ import 'rxjs/add/operator/delay';
|
|||
</nb-layout-header>
|
||||
|
||||
<nb-sidebar class="menu-sidebar"
|
||||
tag="menu-sidebar"
|
||||
responsive
|
||||
[right]="sidebar.id === 'right'">
|
||||
tag="menu-sidebar"
|
||||
responsive
|
||||
[right]="sidebar.id === 'right'">
|
||||
<nb-sidebar-header>
|
||||
<a href="#" class="btn btn-hero-success main-btn">
|
||||
<i class="ion ion-social-github"></i> <span>Support Us</span>
|
||||
|
|
@ -53,16 +51,16 @@ import 'rxjs/add/operator/delay';
|
|||
</nb-layout-footer>
|
||||
|
||||
<nb-sidebar class="settings-sidebar"
|
||||
tag="settings-sidebar"
|
||||
state="collapsed"
|
||||
fixed
|
||||
[right]="sidebar.id !== 'right'">
|
||||
tag="settings-sidebar"
|
||||
state="collapsed"
|
||||
fixed
|
||||
[right]="sidebar.id !== 'right'">
|
||||
<ngx-theme-settings></ngx-theme-settings>
|
||||
</nb-sidebar>
|
||||
</nb-layout>
|
||||
`,
|
||||
})
|
||||
export class SampleLayoutComponent implements OnDestroy {
|
||||
export class SampleLayoutComponent implements OnDestroy {
|
||||
|
||||
subMenu: NbMenuItem[] = [
|
||||
{
|
||||
|
|
@ -127,8 +125,10 @@ export class SampleLayoutComponent implements OnDestroy {
|
|||
|
||||
const isBp = this.bpService.getByName('is');
|
||||
this.menuClick$ = this.menuService.onItemSelect()
|
||||
.withLatestFrom(this.themeService.onMediaQueryChange())
|
||||
.delay(20)
|
||||
.pipe(
|
||||
withLatestFrom(this.themeService.onMediaQueryChange()),
|
||||
delay(20),
|
||||
)
|
||||
.subscribe(([item, [bpFrom, bpTo]]: [any, [NbMediaBreakpoint, NbMediaBreakpoint]]) => {
|
||||
|
||||
if (bpTo.width <= isBp.width) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue