项目作者: sibiraj-s

项目描述 :
📟 Page Title directive for angular-ui-router
高级语言: JavaScript
项目地址: git://github.com/sibiraj-s/ui-router-page-title.git
创建时间: 2018-07-13T06:16:00Z
项目社区:https://github.com/sibiraj-s/ui-router-page-title

开源协议:MIT License

下载


ui-router-page-title Tests

Dynamic Page Title directive for angular-ui-router(>=1.0.0)

Getting Started

Installation

You can directly clone/download here

  1. git clone https://github.com/sibiraj-s/ui-router-page-title.git

or use cdn

Minified:

  1. //cdn.jsdelivr.net/npm/ui-router-page-title@latest/page-title.min.js

Pretty Printed:

  1. //cdn.jsdelivr.net/npm/ui-router-page-title@latest/page-title.js

or

Install via Package managers such as npm or yarn

  1. npm install ui-router-page-title --save
  2. # or
  3. yarn add ui-router-page-title

Usage

Import the modules required for ui-router-page-title. It is necessary to include ui.router for ui-router-page-title to work

  1. <script src="angular.min.js"></script>
  2. <script src="angular-ui-router.min.js"></script>
  3. <script src="../page-title.min.js"></script>

add uiRouterTitle dependency to the module

  1. angular.module('myApp', ['uiRouterTitle']);

in routes config

  1. $stateProvider.state('home', {
  2. url: '/home',
  3. data: {
  4. pageTitle: 'Home'
  5. },
  6. template: '<h3>Home Page!</h3>'
  7. });

and in your html

  1. <title page-title>Page Title</title>