ui-router-page-title
v1.0.13
Published
Page Title directive for angular-ui-router
Downloads
222
Maintainers
Readme
ui-router-page-title
Dynamic Page Title directive for angular-ui-router(>=1.0.0)
Getting Started
Installation
You can directly clone/download here
git clone https://github.com/sibiraj-s/ui-router-page-title.git
or use cdn
Minified:
//cdn.jsdelivr.net/npm/ui-router-page-title@latest/page-title.min.js
Pretty Printed:
//cdn.jsdelivr.net/npm/ui-router-page-title@latest/page-title.js
or
Install via Package managers such as npm or yarn
npm install ui-router-page-title --save
# or
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
<script src="angular.min.js"></script>
<script src="angular-ui-router.min.js"></script>
<script src="../page-title.min.js"></script>
add uiRouterTitle
dependency to the module
angular.module('myApp', ['uiRouterTitle']);
in routes config
$stateProvider.state('home', {
url: '/home',
data: {
pageTitle: 'Home'
},
template: '<h3>Home Page!</h3>'
});
and in your html
<title page-title>Page Title</title>