@ovh-ux/ng-ui-router-title

3.1.1 • Public • Published

ng-ui-router-title

AngularJS module for updating browser title based on the current ui-router state.

npm version Downloads Dependencies Dev Dependencies

Install

yarn add @ovh-ux/ng-ui-router-title

Usage

import angular from 'angular';
import '@ovh-ux/ng-ui-router-title';

angular.module('myApp', ['ngUirouterTitle']).config(
  /* @ngInject */ ($stateProvider) => {
    // When declaring your ui-router state, you can add a custom $title:
    $stateProvider.state('app.item', {
      url: '/app/item',
      resolve: {
        $title($stateParams, $translate) {
          return $translate.instant('item_description_', {
            name: $stateParams.id,
          });
        },
      },
    });
  },
);

Test

yarn test

Contributing

Always feel free to help out! Whether it's filing bugs and feature requests or working on some of the open issues, our contributing guide will help get you started.

License

BSD-3-Clause © OVH SAS

Package Sidebar

Install

npm i @ovh-ux/ng-ui-router-title

Weekly Downloads

1

Version

3.1.1

License

BSD-3-Clause

Unpacked Size

789 kB

Total Files

15

Last publish

Collaborators

  • anooparveti
  • jisay
  • blary_jp
  • antleblanc
  • ovh-ux-cds
  • lizardk
  • ovh
  • marie-j