mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
add service suffix page title service (#2418)
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, ViewEncapsulation } from '@angular/core';
|
import { Component, ViewEncapsulation } from '@angular/core';
|
||||||
import { AlfrescoSettingsService, PageTitle, StorageService } from 'ng2-alfresco-core';
|
import { AlfrescoSettingsService, PageTitleService, StorageService } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-app',
|
selector: 'adf-app',
|
||||||
@@ -29,9 +29,9 @@ export class AppComponent {
|
|||||||
|
|
||||||
constructor(private settingsService: AlfrescoSettingsService,
|
constructor(private settingsService: AlfrescoSettingsService,
|
||||||
private storage: StorageService,
|
private storage: StorageService,
|
||||||
pageTitle: PageTitle) {
|
pageTitleService: PageTitleService) {
|
||||||
this.setProvider();
|
this.setProvider();
|
||||||
pageTitle.setTitle();
|
pageTitleService.setTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
private setProvider() {
|
private setProvider() {
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ import { CookieService } from './src/services/cookie.service';
|
|||||||
import { LogService } from './src/services/log.service';
|
import { LogService } from './src/services/log.service';
|
||||||
import { LogServiceMock } from './src/services/log.service';
|
import { LogServiceMock } from './src/services/log.service';
|
||||||
import { NotificationService } from './src/services/notification.service';
|
import { NotificationService } from './src/services/notification.service';
|
||||||
import { PageTitle } from './src/services/page-title.service';
|
import { PageTitleService } from './src/services/page-title.service';
|
||||||
import { RenditionsService } from './src/services/renditions.service';
|
import { RenditionsService } from './src/services/renditions.service';
|
||||||
import { StorageService } from './src/services/storage.service';
|
import { StorageService } from './src/services/storage.service';
|
||||||
import { ThumbnailService } from './src/services/thumbnail.service';
|
import { ThumbnailService } from './src/services/thumbnail.service';
|
||||||
@@ -73,7 +73,7 @@ import { MomentDateAdapter } from './src/utils/momentDateAdapter';
|
|||||||
export { CreateFolderDialogComponent } from './src/dialogs/create-folder.dialog';
|
export { CreateFolderDialogComponent } from './src/dialogs/create-folder.dialog';
|
||||||
export { DownloadZipDialogComponent } from './src/dialogs/download-zip.dialog';
|
export { DownloadZipDialogComponent } from './src/dialogs/download-zip.dialog';
|
||||||
|
|
||||||
export { PageTitle } from './src/services/page-title.service';
|
export { PageTitleService } from './src/services/page-title.service';
|
||||||
export { ContentService } from './src/services/content.service';
|
export { ContentService } from './src/services/content.service';
|
||||||
export { StorageService } from './src/services/storage.service';
|
export { StorageService } from './src/services/storage.service';
|
||||||
export { CookieService } from './src/services/cookie.service';
|
export { CookieService } from './src/services/cookie.service';
|
||||||
@@ -166,7 +166,7 @@ export * from './src/services/search.service';
|
|||||||
|
|
||||||
export function providers() {
|
export function providers() {
|
||||||
return [
|
return [
|
||||||
PageTitle,
|
PageTitleService,
|
||||||
UserPreferencesService,
|
UserPreferencesService,
|
||||||
NotificationService,
|
NotificationService,
|
||||||
LogService,
|
LogService,
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import { inject, TestBed } from '@angular/core/testing';
|
|||||||
import { Title } from '@angular/platform-browser';
|
import { Title } from '@angular/platform-browser';
|
||||||
|
|
||||||
import { AppConfigService } from './app-config.service';
|
import { AppConfigService } from './app-config.service';
|
||||||
import { PageTitle } from './page-title.service';
|
import { PageTitleService } from './page-title.service';
|
||||||
|
|
||||||
class TestConfig {
|
class TestConfig {
|
||||||
private setup: any = {
|
private setup: any = {
|
||||||
@@ -27,7 +27,7 @@ class TestConfig {
|
|||||||
};
|
};
|
||||||
|
|
||||||
titleService: Title = null;
|
titleService: Title = null;
|
||||||
appTitleService: PageTitle = null;
|
appTitleService: PageTitleService = null;
|
||||||
|
|
||||||
constructor(setup: any = {}) {
|
constructor(setup: any = {}) {
|
||||||
Object.assign(this.setup, setup);
|
Object.assign(this.setup, setup);
|
||||||
@@ -55,11 +55,11 @@ class TestConfig {
|
|||||||
providers: [
|
providers: [
|
||||||
titleServiceProvider,
|
titleServiceProvider,
|
||||||
appConfigProvider,
|
appConfigProvider,
|
||||||
PageTitle
|
PageTitleService
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
inject([ Title, PageTitle ], (titleService, appTitleService) => {
|
inject([ Title, PageTitleService ], (titleService, appTitleService) => {
|
||||||
this.titleService = titleService;
|
this.titleService = titleService;
|
||||||
this.appTitleService = appTitleService;
|
this.appTitleService = appTitleService;
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import { Title } from '@angular/platform-browser';
|
|||||||
import { AppConfigService } from './app-config.service';
|
import { AppConfigService } from './app-config.service';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class PageTitle {
|
export class PageTitleService {
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private titleService: Title,
|
private titleService: Title,
|
||||||
|
|||||||
Reference in New Issue
Block a user