1.0.9 • Published 8 years ago
sinus-meta v1.0.9
sinus-meta
Installation
To install this library, run:
$ npm install sinus-meta --save
Consuming your library
Once you have published your library to npm, you can import your library in any Angular application by running:
$ npm install sinus-meta
and then from your Angular AppModule
:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
// Import your library
import { SinusMetaModule } from 'sinus-meta';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
// Specify your library as an import
LibraryModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Once your library is imported, you can use html meta data options:
constructor(
private sinusMetaService: SinusMetaService
) {
let currentTitle = sinusMetaService.getTitel( );
sinusMetaService.setTitel( 'new page title' );
}
License
MIT © Sina Nadihagh