$rootScope.setTitle = function (title) { var $body = $('body'); var $iframe = $('<iframe src="/favicon.ico"></iframe>'); $iframe.on('load', function () { $timeout(function () { $iframe.off('load').remove(); }, 0); }).appendTo($body); document.title = title; }
$scope.setTitle('活动详情');