@@ -6,7 +6,6 @@ import { BrowserModule } from '@angular/platform-browser';
66import { BrowserAnimationsModule } from '@angular/platform-browser/animations' ;
77// libs
88import { CookieService } from 'ngx-cookie-service' ;
9- import { MetaLoader , MetaModule , MetaSettings , MetaStaticLoader , PageTitlePositioning , } from '@ngx-meta/core' ;
109import { PrebootModule } from 'preboot' ;
1110// shared
1211import { TransferHttpModule } from '../modules/transfer-http/transfer-http.module' ;
@@ -15,29 +14,7 @@ import { SharedModule } from '@shared/shared.module';
1514import { AppRoutes } from './app.routing' ;
1615import { AppComponent } from './app.component' ;
1716
18- export function metaFactory ( ) : MetaLoader {
19- const setting : MetaSettings = {
20- callback : ( key : string ) => key ,
21- pageTitlePositioning : PageTitlePositioning . PrependPageTitle ,
22- pageTitleSeparator : ' | ' ,
23- applicationName : 'App Universal' ,
24- // applicationUrl: 'https://gorniv.com/',
25- defaults : {
26- title : 'default page title' ,
27- description : 'default description' ,
28- 'og:site_name' : 'App site Universal' ,
29- 'og:type' : 'website' ,
30- 'og:locale' : 'ru_RU' ,
31- 'og:locale:alternate' : 'en_GB'
32- }
33- } ;
34- return new MetaStaticLoader ( setting ) ;
35- }
36-
3717@NgModule ( {
38- declarations : [
39- AppComponent ,
40- ] ,
4118 imports : [
4219 BrowserModule . withServerTransition ( { appId : 'my-app' } ) ,
4320 PrebootModule . withConfig ( { appRoot : 'app-root' } ) ,
@@ -47,12 +24,8 @@ export function metaFactory(): MetaLoader {
4724 TransferHttpModule ,
4825 BrowserAnimationsModule ,
4926 SharedModule . forRoot ( ) ,
50- MetaModule . forRoot ( {
51- provide : MetaLoader ,
52- useFactory : metaFactory ,
53- deps : [ ]
54- } ) ,
5527 ] ,
28+ declarations : [ AppComponent ] ,
5629 providers : [ CookieService ] ,
5730 bootstrap : [ AppComponent ]
5831} )
0 commit comments