0.0.5 • Published 3 years ago

ngx-page-title v0.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

Dynamic page title for browsers.

String operations for angular projects

Preview demo

This preview was generated with Stackblitz

Angular version

This library was generated with Angular CLI version 9.1.9.

Code integration

To use this package as a service npm i ngx-page-title install this on the root angular project .

Note: Don't forget to run this commend npm i ngx-page-title on root folder or else it will throw error.

Import

Import the module on your app.module.ts file as follow.

import { NgxPageTitleModule } from "ngx-page-title";

Then import the module as follow on imports array

NgxPageTitleModule

In your constructor of a required component import the service as follow

import { NgxPageTitleService } from 'ngx-page-title';

Add the dependency on construtor as follows

constructor(private title: NgxPageTitleService) {

this.title.setTitle("title goes here")

}

Using

After importing this library with npm install ngx-page-title, go to the component which is declared under app.module.ts and integrate as below. use it on any component or else declare it on app.component.ts for enabling it global to application.