Standard
This module allows managing HTML <meta>
tags whose name
attribute is defined in the HTML specification and the site's <title>
. We call those standard meta tags
Setup
Depending on what metadata you need to set, add one of more of the following modules / providers.
Main
This is the default for apps generated with Angular CLI before v17
Add NgxMetaStandardModule
to your module-based app's app.module.ts
file. Check out get started setup for more details.
app.module.ts
import {NgxMetaStandardModule} from '@davidlj95/ngx-meta/standard';
@NgModule({
// ...
imports: [
// ...
NgxMetaCoreModule.forRoot(),
NgxMetaRoutingModule.forRoot(),
NgxMetaStandardModule,
// ...
],
// ...
})
export class AppModule {}
This is the default for apps generated with Angular CLI v17 and above
Add provideNgxMetaStandard()
to your standalone app's app.config.ts
file providers. Check out get started setup for more details.
app.config.ts
import {provideNgxMetaStandard} from '@davidlj95/ngx-meta/standard';
export const appConfig: ApplicationConfig = {
// ...
providers: [
// ...
provideNgxMetaCore(),
provideNgxMetaRouting(),
provideNgxMetaStandard(),
// ...
],
}
Type
Following Typescript type provides you with all implemented metadata you can set:
import { StandardMetadata } from '@davidlj95/ngx-meta/standard'
StandardMetadata
API Reference