2.0.0 • Published 5 years ago

@ovh-ux/ng-uirouter-title v2.0.0

Weekly downloads
3
License
BSD-3-Clause
Repository
github
Last release
5 years ago

ng-uirouter-title

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

Downloads Dependencies Dev Dependencies Gitter

Install

yarn add @ovh-ux/ng-uirouter-title

Usage

import angular from 'angular';
import '@ovh-ux/ng-uirouter-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