mirror of
https://github.com/akveo/ngx-admin.git
synced 2026-01-15 05:58:52 +01:00
add meta data (#5641)
* fix(pages): fix titles and descriptions * fix(pages): titles and discriptions * fix(pages): tripple * fix(pages): fix titles * feat(app): add og logo
This commit is contained in:
parent
e4cfcd3123
commit
2a09d3bbb5
18 changed files with 112 additions and 30 deletions
|
|
@ -4,18 +4,18 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*/
|
||||
|
||||
import { Component, OnDestroy } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { takeWhile, withLatestFrom, map } from 'rxjs/operators';
|
||||
import {Component, OnDestroy} from '@angular/core';
|
||||
import {Router} from '@angular/router';
|
||||
import {map, takeWhile, withLatestFrom} from 'rxjs/operators';
|
||||
import {
|
||||
NbThemeService,
|
||||
NbMediaBreakpoint,
|
||||
NbMenuItem,
|
||||
NbSidebarService,
|
||||
NbMediaBreakpoint,
|
||||
} from '@nebular/theme';
|
||||
NbThemeService} from '@nebular/theme';
|
||||
|
||||
import { NgxMenuService } from '../../@theme/services/menu.service';
|
||||
import { NgxPaginationService } from '../../@theme/services/pagination.service';
|
||||
import {NgxMenuService} from '../../@theme/services/menu.service';
|
||||
import {NgxPaginationService} from '../../@theme/services/pagination.service';
|
||||
import {MetadataService} from '../../../../src/app/@core/utils/metadata.service';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-landing-docs',
|
||||
|
|
@ -34,7 +34,12 @@ export class LandingDocsComponent implements OnDestroy {
|
|||
private router: Router,
|
||||
private themeService: NbThemeService,
|
||||
private sidebarService: NbSidebarService,
|
||||
private paginationService: NgxPaginationService) {
|
||||
private paginationService: NgxPaginationService,
|
||||
private metadataService: MetadataService) {
|
||||
|
||||
this.metadataService.updateDescription('Free and Open Source ngx-admin to bootstrap the development of ' +
|
||||
'your product or to learn Angular. Over 40+ Angular Components and 60+ Usage Examples.');
|
||||
this.metadataService.updateTitle('A front-end admin dashboard on Angular 9+, Bootstrap 4+ and Nebular.');
|
||||
|
||||
this.themeService.changeTheme('docs-page');
|
||||
this.paginationService.setPaginationItems('/docs');
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
import { Component, Inject, NgZone, OnDestroy, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { Title } from '@angular/platform-browser';
|
||||
import {
|
||||
filter,
|
||||
map,
|
||||
|
|
@ -21,6 +20,7 @@ import { fromEvent } from 'rxjs';
|
|||
|
||||
import { NgxStructureService } from '../../../@theme/services/structure.service';
|
||||
import { NgxTocStateService } from '../../../@theme/services/toc-state.service';
|
||||
import {MetadataService} from '../../../../../src/app/@core/utils/metadata.service';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-admin-landing-page',
|
||||
|
|
@ -38,7 +38,7 @@ export class NgxAdminLandingPageComponent implements OnDestroy, OnInit {
|
|||
private activatedRoute: ActivatedRoute,
|
||||
private structureService: NgxStructureService,
|
||||
private tocState: NgxTocStateService,
|
||||
private titleService: Title) {
|
||||
private metaDataService: MetadataService) {
|
||||
}
|
||||
|
||||
get showSettings() {
|
||||
|
|
@ -63,7 +63,8 @@ export class NgxAdminLandingPageComponent implements OnDestroy, OnInit {
|
|||
}),
|
||||
filter(item => item),
|
||||
tap((item: any) => {
|
||||
this.titleService.setTitle(`Nebular - ${item.name}`);
|
||||
this.metaDataService.updateTitle(`Nebular - ${item.name}`);
|
||||
this.metaDataService.updateDescription(item.description);
|
||||
}),
|
||||
publishReplay(),
|
||||
refCount(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue