mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-17 16:00:14 +01:00
feat: docs app
This commit is contained in:
parent
62e6828680
commit
165e64eaca
203 changed files with 15928 additions and 6 deletions
|
|
@ -0,0 +1,51 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright Akveo. All Rights Reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*/
|
||||
|
||||
import { AfterViewInit, Component, ElementRef, EventEmitter, Inject, Output } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { delay, filter, take } from 'rxjs/operators';
|
||||
import { NB_WINDOW } from '@nebular/theme';
|
||||
|
||||
import { BUNDLE_LICENSE, BundlesService, Feature, Product } from '../../../@core/data/service/bundles.service';
|
||||
import { Descriptions, DescriptionsService } from '../../../@core/data/service/descriptions.service';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-backend-bundles-section',
|
||||
templateUrl: 'backend-bundles-section.component.html',
|
||||
styleUrls: ['./backend-bundles-section.component.scss'],
|
||||
})
|
||||
export class BackendBundlesSectionComponent implements AfterViewInit {
|
||||
|
||||
@Output() loaded = new EventEmitter();
|
||||
|
||||
selectedLicenseType = BUNDLE_LICENSE.single;
|
||||
|
||||
licenses = Object.values(BUNDLE_LICENSE);
|
||||
|
||||
descriptions: Observable<Descriptions[]> = this.descriptionService.getBundleDescriptions();
|
||||
products: Observable<Product[]> = this.bundlesService.getProducts();
|
||||
features: Observable<Feature[]> = this.bundlesService.getFeatures();
|
||||
|
||||
constructor(private descriptionService: DescriptionsService,
|
||||
private bundlesService: BundlesService,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private el: ElementRef<HTMLElement>,
|
||||
@Inject(NB_WINDOW) private window) {
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.activatedRoute.fragment
|
||||
.pipe(
|
||||
filter(fragment => fragment === 'backend-bundles'),
|
||||
delay(500),
|
||||
take(1),
|
||||
)
|
||||
.subscribe((fragment: string) => {
|
||||
this.window.scrollTo(0, this.el.nativeElement.offsetTop);
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue