@ngsm/title
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

Title module based on the @ngx-translate/core package.

Installation

yarn add @ngsm/title or npm i @ngsm/title --save

Requirements

Library requires @ngx-translate/core, you can use also @ngsm/i18n module.

Usage

App module:

import { I18nModule } from '@ngsm/i18n';
import { TitleModule } from '@ngsm/title';
...

@NgModule({
  imports: [
    ...
    TitleModule,
    I18nModule,
  ],
  ...
})
export class AppModule {}

Single routing:

const routes: Routes = [
  {
    path: '',
    component: MyPageComponent,
    data: {
      title: 'title.myPage',
    },
  },
];

...

Translations should be added in i18n directory in your assets (for example /src/assets/i18n/en.json):

{
  "title": {
    "myPage": "Here is my title",
    "default": "My default title",
    "suffix": "My title suffix"
  }
}

Author

Sebastian Musiał

kontakt@sebastianmusial.pl

@sebamusial

Dependencies (9)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @ngsm/title

    Weekly Downloads

    6

    Version

    0.1.2

    License

    none

    Unpacked Size

    140 kB

    Total Files

    32

    Last publish

    Collaborators

    • sebastian.musial