{"_id":"angular-ui-router-title","_rev":"8-99a0c7d1bd1a99aa2f7f89f5f78703a5","name":"angular-ui-router-title","description":"AngularJS module for updating browser title/history based on the current ui-router state.","dist-tags":{"latest":"0.1.1"},"versions":{"0.0.1":{"name":"angular-ui-router-title","version":"0.0.1","description":"AngularJS module for updating browser title/history based on the current ui-router state.","main":"angular-ui-router-title.js","directories":{"test":"test"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/nonplus/angular-ui-router-title.git"},"author":{"name":"Stepan Riha","email":"github@nonplus.net"},"license":"MIT","bugs":{"url":"https://github.com/nonplus/angular-ui-router-title/issues"},"homepage":"https://github.com/nonplus/angular-ui-router-title","devDependencies":{"angular":"^1.3.15","angular-mocks":"^1.3.15","angular-ui-router":"^0.2.14","gulp":"^3.8.11","gulp-bump":"^0.3.0","gulp-filter":"^2.0.2","gulp-git":"^1.2.3","gulp-karma":"0.0.4","gulp-serve":"^0.3.1","gulp-tag-version":"^1.2.1","gulp-util":"^3.0.4","gulp-wrap":"^0.11.0","jasmine-core":"^2.3.2","karma":"^0.12.31","karma-chrome-launcher":"^0.1.8","karma-jasmine":"^0.3.5","lodash":"^3.8.0","open":"0.0.5","run-sequence":"^1.1.0"},"gitHead":"380f41edfc26756d7dc172884b8cf644fc9dbd7d","_id":"angular-ui-router-title@0.0.1","_shasum":"7014e113412a95d55491c67962795356d0b4a5df","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"nonplus","email":"github@nonplus.net"},"dist":{"shasum":"7014e113412a95d55491c67962795356d0b4a5df","tarball":"https://registry.npmjs.org/angular-ui-router-title/-/angular-ui-router-title-0.0.1.tgz","integrity":"sha512-TeHWp4H2gK3Ldb1vy36GobD9+aJTbK+TFXfgLBsI8667DP3T3e8MevQU6RIPvlOmH/H4BNG9rva0Hxa5jplA5g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFeVHhurGZzOe6B6yQyyA6528fg2cSRRWGeoku0fvO9eAiBLlpeJ6bvC9foIWTjJbRYx34SrwaF3H5QbjqenAV6fYw=="}]},"maintainers":[{"name":"nonplus","email":"github@nonplus.net"}]},"0.0.2":{"name":"angular-ui-router-title","version":"0.0.2","description":"AngularJS module for updating browser title/history based on the current ui-router state.","main":"angular-ui-router-title.js","directories":{"test":"test"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/nonplus/angular-ui-router-title.git"},"author":{"name":"Stepan Riha","email":"github@nonplus.net"},"license":"MIT","bugs":{"url":"https://github.com/nonplus/angular-ui-router-title/issues"},"homepage":"https://github.com/nonplus/angular-ui-router-title","devDependencies":{"angular":"^1.3.15","angular-mocks":"^1.3.15","angular-ui-router":"^0.2.14","gulp":"^3.8.11","gulp-bump":"^0.3.0","gulp-filter":"^2.0.2","gulp-git":"^1.2.3","gulp-karma":"0.0.4","gulp-serve":"^0.3.1","gulp-tag-version":"^1.2.1","gulp-util":"^3.0.4","gulp-wrap":"^0.11.0","jasmine-core":"^2.3.2","karma":"^0.12.31","karma-chrome-launcher":"^0.1.8","karma-jasmine":"^0.3.5","lodash":"^3.8.0","open":"0.0.5","run-sequence":"^1.1.0"},"gitHead":"e76ee4868e78e1f482bc0f079101e91af1e9eacc","_id":"angular-ui-router-title@0.0.2","_shasum":"c16b83e550903b6c2b399e483774bbfb014849c2","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"nonplus","email":"github@nonplus.net"},"dist":{"shasum":"c16b83e550903b6c2b399e483774bbfb014849c2","tarball":"https://registry.npmjs.org/angular-ui-router-title/-/angular-ui-router-title-0.0.2.tgz","integrity":"sha512-Wn4pvUZ6NK0qrD8nXY1WLlxx3Ffn3+PnTzd2TJP9tJBuOoBDrVSOmnyzEPlMIpD3sNbjjifjf6FeBaS+tFWfJA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICBO6ad21+J7cOajeZOfarc8NNIXJV7D77/KQLO4X+8/AiBPyBxoEvdPMVjgZ8M0QATULeP0/bc0b75+rZ30Uy9Kag=="}]},"maintainers":[{"name":"nonplus","email":"github@nonplus.net"}]},"0.0.3":{"name":"angular-ui-router-title","version":"0.0.3","description":"AngularJS module for updating browser title/history based on the current ui-router state.","main":"angular-ui-router-title.js","directories":{"test":"test"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/nonplus/angular-ui-router-title.git"},"author":{"name":"Stepan Riha","email":"github@nonplus.net"},"license":"MIT","bugs":{"url":"https://github.com/nonplus/angular-ui-router-title/issues"},"homepage":"https://github.com/nonplus/angular-ui-router-title","devDependencies":{"angular":"^1.3.15","angular-mocks":"^1.3.15","angular-ui-router":"^0.2.14","gulp":"^3.8.11","gulp-bump":"^0.3.0","gulp-filter":"^2.0.2","gulp-git":"^1.2.3","gulp-karma":"0.0.4","gulp-serve":"^0.3.1","gulp-tag-version":"^1.2.1","gulp-util":"^3.0.4","gulp-wrap":"^0.11.0","jasmine-core":"^2.3.2","karma":"^0.12.31","karma-chrome-launcher":"^0.1.8","karma-jasmine":"^0.3.5","lodash":"^3.8.0","open":"0.0.5","run-sequence":"^1.1.0"},"gitHead":"d4fda7fa06b7c1bac56f96881aeafd5f19e614c6","_id":"angular-ui-router-title@0.0.3","_shasum":"423e26889b86af5951a9e6317d2f8ec4c4733e6a","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"nonplus","email":"github@nonplus.net"},"dist":{"shasum":"423e26889b86af5951a9e6317d2f8ec4c4733e6a","tarball":"https://registry.npmjs.org/angular-ui-router-title/-/angular-ui-router-title-0.0.3.tgz","integrity":"sha512-qCkbTYr8K6ndvjlI2aFuMdr6/AYUgGKGR8Y7mCk7pwMHd1DiGEsiXCIcsXlQpA57rixS7zdtGp6Vh1NKIZLzcA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAziPI/6E3qNfPGKkIqRCncRIOIqi/KpUqLkmT1VJXpzAiAZXWJS17hC3234P8uptkGJFBjQfRmjzczLrU6l+52rTQ=="}]},"maintainers":[{"name":"nonplus","email":"github@nonplus.net"}]},"0.0.4":{"name":"angular-ui-router-title","version":"0.0.4","description":"AngularJS module for updating browser title/history based on the current ui-router state.","main":"angular-ui-router-title.js","directories":{"test":"test"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/nonplus/angular-ui-router-title.git"},"author":{"name":"Stepan Riha","email":"github@nonplus.net"},"license":"MIT","bugs":{"url":"https://github.com/nonplus/angular-ui-router-title/issues"},"homepage":"https://github.com/nonplus/angular-ui-router-title","devDependencies":{"angular":"^1.3.15","angular-mocks":"^1.3.15","angular-ui-router":"^0.2.14","gulp":"^3.8.11","gulp-bump":"^0.3.0","gulp-filter":"^2.0.2","gulp-git":"^1.2.3","gulp-karma":"0.0.4","gulp-serve":"^0.3.1","gulp-tag-version":"^1.2.1","gulp-util":"^3.0.4","gulp-wrap":"^0.11.0","jasmine-core":"^2.3.2","karma":"^0.12.31","karma-chrome-launcher":"^0.1.8","karma-jasmine":"^0.3.5","lodash":"^3.8.0","open":"0.0.5","run-sequence":"^1.1.0"},"gitHead":"260cb54b12351523b2b2b222bec3e6fd936e8f9b","_id":"angular-ui-router-title@0.0.4","_shasum":"86c2e97625befc0b2b480e40509a17cdefb93764","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"nonplus","email":"github@nonplus.net"},"dist":{"shasum":"86c2e97625befc0b2b480e40509a17cdefb93764","tarball":"https://registry.npmjs.org/angular-ui-router-title/-/angular-ui-router-title-0.0.4.tgz","integrity":"sha512-pS3DW2fb9vDB8PZqQbKxR/08HTF+LWOgFwyIdfAjmD6JttlWIP6ILzyhM6ObrLHZftOctNEN6ld92v+wEpD0+g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBFDNuEEZR0pBbQ0GcZAsN6GXw+Sc2hsY1cBJTpYO6lPAiBSVOS8WZSHF/w3m4bcrDFAUuizA8LNQlouY0rgOBIZ3Q=="}]},"maintainers":[{"name":"nonplus","email":"github@nonplus.net"}]},"0.1.0":{"name":"angular-ui-router-title","version":"0.1.0","description":"AngularJS module for updating browser title/history based on the current ui-router state.","main":"angular-ui-router-title.js","types":"./index.d.ts","directories":{"test":"test"},"scripts":{"ts-compile":"./node_modules/gulp/bin/gulp.js lint ts-compile","karma-test":"./node_modules/karma/bin/karma start --browsers Firefox --single-run","test":"npm run ts-compile && npm run karma-test"},"repository":{"type":"git","url":"git+https://github.com/nonplus/angular-ui-router-title.git"},"author":{"name":"Stepan Riha","email":"github@nonplus.net"},"license":"MIT","bugs":{"url":"https://github.com/nonplus/angular-ui-router-title/issues"},"homepage":"https://github.com/nonplus/angular-ui-router-title","devDependencies":{"@types/angular-mocks":"^1.5.5","@types/jasmine":"^2.5.36","angular":"^1.3.15","angular-mocks":"^1.3.15","angular-ui-router":"^0.2.18","gulp":"^3.8.11","gulp-bump":"^0.3.0","gulp-filter":"^2.0.2","gulp-git":"^1.2.3","gulp-karma":"0.0.4","gulp-serve":"^0.3.1","gulp-tag-version":"^1.2.1","gulp-tslint":"^6.1.2","gulp-typescript":"^3.1.2","gulp-util":"^3.0.4","gulp-wrap":"^0.11.0","jasmine-core":"^2.3.2","karma":"^0.12.31","karma-chrome-launcher":"^0.1.8","karma-firefox-launcher":"^1.0.0","karma-jasmine":"^0.3.5","lodash":"^3.8.0","open":"0.0.5","run-sequence":"^1.1.0","tslint":"^3.15.1","typescript":"^2.0.6"},"dependencies":{"@types/angular":"^1.5.17","@types/angular-ui-router":"^1.1.34"},"gitHead":"9e71e5378736b20cf95390d6bb8e45f7b36cecb0","_id":"angular-ui-router-title@0.1.0","_shasum":"d7de11ea5eed365ac90acf3f2125ebbf49943b7a","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.9.1","_npmUser":{"name":"nonplus","email":"github@nonplus.net"},"dist":{"shasum":"d7de11ea5eed365ac90acf3f2125ebbf49943b7a","tarball":"https://registry.npmjs.org/angular-ui-router-title/-/angular-ui-router-title-0.1.0.tgz","integrity":"sha512-L7+VAGAAc8bdoVfbo/T+wffLvMQGxs/yACBdwb/Tgl6tL4E2/Qsuv+o6tzvQqWAED45u67uN56t1dUXz2L6lmw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCw05XPZrKyjA1yaoRFD4xlXKjTD4VwPCl2cGlD7C1NuAIhALZguaa21135KAYNJTqzjZAR7UV4iISjOqpZurak7+TQ"}]},"maintainers":[{"name":"nonplus","email":"github@nonplus.net"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/angular-ui-router-title-0.1.0.tgz_1480679994435_0.6547911688685417"}},"0.1.1":{"name":"angular-ui-router-title","version":"0.1.1","description":"AngularJS module for updating browser title/history based on the current ui-router state.","main":"angular-ui-router-title.js","types":"./index.d.ts","directories":{"test":"test"},"scripts":{"ts-compile":"./node_modules/gulp/bin/gulp.js lint ts-compile","karma-test":"./node_modules/karma/bin/karma start --browsers Firefox --single-run","test":"npm run ts-compile && npm run karma-test"},"repository":{"type":"git","url":"git+https://github.com/nonplus/angular-ui-router-title.git"},"author":{"name":"Stepan Riha","email":"github@nonplus.net"},"license":"MIT","bugs":{"url":"https://github.com/nonplus/angular-ui-router-title/issues"},"homepage":"https://github.com/nonplus/angular-ui-router-title","devDependencies":{"@types/angular-mocks":"^1.5.5","@types/jasmine":"^2.5.36","angular":"^1.3.15","angular-mocks":"^1.3.15","angular-ui-router":"^0.2.18","gulp":"^3.8.11","gulp-bump":"^0.3.0","gulp-filter":"^2.0.2","gulp-git":"^1.2.3","gulp-karma":"0.0.4","gulp-serve":"^0.3.1","gulp-tag-version":"^1.2.1","gulp-tslint":"^6.1.2","gulp-typescript":"^3.1.2","gulp-util":"^3.0.4","gulp-wrap":"^0.11.0","jasmine-core":"^2.3.2","karma":"^0.12.31","karma-chrome-launcher":"^0.1.8","karma-firefox-launcher":"^1.0.0","karma-jasmine":"^0.3.5","lodash":"^3.8.0","open":"0.0.5","run-sequence":"^1.1.0","tslint":"^3.15.1","typescript":"^2.0.6"},"dependencies":{"@types/angular":"^1.5.17","@types/angular-ui-router":"^1.1.34"},"gitHead":"8afa58d2e258b5b574f46f6b38604ac854170023","_id":"angular-ui-router-title@0.1.1","_shasum":"9a9fed4e6b9b85794e839a300d1088f7c438caeb","_from":".","_npmVersion":"4.0.5","_nodeVersion":"6.9.1","_npmUser":{"name":"nonplus","email":"github@nonplus.net"},"dist":{"shasum":"9a9fed4e6b9b85794e839a300d1088f7c438caeb","tarball":"https://registry.npmjs.org/angular-ui-router-title/-/angular-ui-router-title-0.1.1.tgz","integrity":"sha512-PtY8U/42VFmRrQEWZil7TpBzZ98s9Rkw/+fWW1Gc3WHtvXnfc1lnf8UbZ2K9KZAA6aX3Z0D2A8AFaJdOBqCsAg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCCQuAA4MdQufZBhy5rJ5go6NVrF58T2KpN93FdJmsAuwIgFuNE0FOgQXHJZ3a86ggvOkEyUB0tQUiIhuXZgvX4Bms="}]},"maintainers":[{"name":"nonplus","email":"github@nonplus.net"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/angular-ui-router-title-0.1.1.tgz_1484925264553_0.2063598046079278"}}},"readme":"angular-ui-router-title\n=========================\n\n[![Build Status](https://travis-ci.org/nonplus/angular-ui-router-title.svg?branch=master)](https://travis-ci.org/nonplus/angular-ui-router-title)\n\nAngularJS module for updating browser title/history based on the current ui-router state.\n\n\nMotivation\n----------\n\nUsing ui-router states with `url` configurations enables browser history support and bookmarking of application state.\nIt is important that the title in the browser history/bookmark represent the application state so that the user can tell\nwhere she's navigating to.\n\nThe module provides a `$title` variable on the `$rootScope` that is populated based on the `$title` value resolved\nin `$state.$current` (or one of its parent states).  If the current state doesn't resolve a `$title`,\nthen `$rootScope.$title` will be `undefined`.\n\nThe module also provides a `$breadcrumbs` array that is populated based on the `$title` of `$state.$current` and its parent states.\n\nThe module sets the `document.title` to the value of the `$title` variable or, if configured, to the value returned by a `documentTitle(title)` callback.\nThe browser sets bookmark and browser history text based on the `document.title`.\n\n\nInstalling the Module\n---------------------\nInstallation can be done through bower:\n``` shell\nbower install angular-ui-router-title\n```\n\nIn your page add:\n```html\n  <script src=\"bower_components/angular-ui-router-title/angular-ui-router-title.js\"></script>\n```\n\n\nLoading the Module\n------------------\n\nThis module declares itself as `ui.router.title`, so it can be declared as a dependency of your application as normal:\n\n```javascript\nvar app = angular.module('myApp', ['ng', 'ui.router.title']);\n```\n\n\nSpecifying the $title in the state definition\n---------------------------------------------\n\nA state defines its title by declaring a `$title` value in its `resolve` block.\nIt's a good idea for the `$title` to include information from the current state,\nso it may need to inject the `$stateParam` or another value that was resolved from them.\n\n```javascript\n$stateProvider\n  .state('home', {\n    ...\n    resolve: {\n      // Constant title\n      $title: function() { return 'Home'; }\n    }\n  })\n  .state('about', {\n    url: '/about',\n    ...\n    resolve: {\n      // Constant title\n      $title: function() { return 'About'; }\n    }\n  })\n  .state('contacts', {\n    url: '/contacts',\n    ...\n    resolve: {\n      // List of contacts\n      contacts: ['Contacts', function(Contacts) {\n        // Use Contacts service to retrieve list\n        return Contacts.query();\n      }],\n      // Dynamic title showing number of contacts\n      $title: ['contacts', function(contacts) {\n        return 'Contacts (' + contacts.length + ')';\n      }]\n    }\n  })\n  .state('contact', {\n    url: '/contact/:contactId',\n    ...\n    resolve: {\n      // Single contact\n      contact: ['Contacts', '$stateParams', function(Contacts, $stateParams) {\n        // Use Contacts service to retrieve a contact\n        return Contacts.get({ id: $stateParams.contactId });\n      }],\n      // Dynamic title showing the name of contact\n      $title: ['contact', function(contact) {\n        return contact.name;\n      }]\n    }\n  })\n  .state('contact.edit', {\n    url: '/edit',\n    ...\n    resolve: {\n      // Dynamic title appending to parent state's title\n      $title: ['$title', function($title) {\n        return $title + \" (edit)\";\n      }]\n    }\n  })\n```\n\n\nConfiguring a custom document.title\n-----------------------------------\n\nBy default, the module will set the `document.title` to the value of `$rootScope.$title`.  A common convention is to include\nthe application name in the document.title.  Customization of the `document.title` can be achieved via the `$titleProvier.documentTitle`\ncallback specification.\n\n```javascript\nangular.module('myApp', ['ng', 'ui.router.title'])\n  .config(function($titleProvider) {\n    $titleProvider.documentTitle(function($rootScope) {\n      return $rootScope.$title ? $rootScope.$title + \" - My Application\" : \"My Application\";\n    });\n  });\n```\n\n\nUsing the $title in a header\n----------------------------\n\nThe `$title` property contains the resolve title and cen be used, for example, to set the contents of an `<h1>` tag.\n\n```html\n  <h1 ng-bind=\"($title || 'Home') + ' - My Application'\">My Application</h1>\n```\n\n\nUsing the $breadcrumbs\n----------------------\n\nThe `$breadcrumbs` array contains objects, one for each state that resolves a `$title` value.  Each entry contains:\n\n  * `title`: $title value of this state\n  * `state`: name of the state\n  * `stateParams`: $stateParams of the state.\n\n```html\n<ol class=\"breadcrumb\">\n\t<li ng-repeat=\"crumb in $breadcrumbs\" ng-class=\"{ 'active' : $last }\">\n\t\t<a ng-if=\"!$last\" href=\"{{$state.href(crumb.state, crumb.stateParams)}}\">{{crumb.title}}</a>\n\t\t<span ng-if=\"$last\">{{crumb.title}}</span>\n\t</li>\n</ol>\n```\n\n\nCopyright & License\n-------------------\n\nCopyright 2015 Stepan Riha. All Rights Reserved.\n\nThis may be redistributed under the MIT licence. For the full license terms, see the LICENSE file which\nshould be alongside this readme.\n","maintainers":[{"name":"nonplus","email":"github@nonplus.net"}],"time":{"modified":"2022-06-13T02:59:05.974Z","created":"2015-05-09T20:55:39.567Z","0.0.1":"2015-05-09T20:55:39.567Z","0.0.2":"2015-05-13T04:05:03.414Z","0.0.3":"2015-05-21T23:57:55.165Z","0.0.4":"2015-08-08T14:53:50.063Z","0.1.0":"2016-12-02T11:59:56.843Z","0.1.1":"2017-01-20T15:14:26.388Z"},"homepage":"https://github.com/nonplus/angular-ui-router-title","repository":{"type":"git","url":"git+https://github.com/nonplus/angular-ui-router-title.git"},"author":{"name":"Stepan Riha","email":"github@nonplus.net"},"bugs":{"url":"https://github.com/nonplus/angular-ui-router-title/issues"},"license":"MIT","readmeFilename":"README.md"}