Sha256: 6fdff95f912d64f6699ad56992db5dc446ee53a2f20e49148bd2d14e1056cc27
Contents?: true
Size: 824 Bytes
Versions: 236
Compression:
Stored size: 824 Bytes
Contents
/** * @ngdoc service * @name Bastion.components.service:PageTitle * * @requires $window * @requires $interpolate * * @description * Service to set the title of the page and maintain a */ angular.module('Bastion.components').service('PageTitle', ['$window', '$interpolate', function ($window, $interpolate) { this.titles = []; this.setTitle = function (title, locals) { var interpolated; if (title) { interpolated = $interpolate(title); $window.document.title = interpolated(locals); this.titles.push($window.document.title); } }; this.resetToFirst = function () { this.titles = this.titles.slice(0, 1); $window.document.title = this.titles[0]; }; }] );
Version data entries
236 entries across 236 versions & 2 rubygems