angular 全局title 兼容ios

$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('活动详情');

猜你喜欢

转载自blog.csdn.net/thinking771470736/article/details/60571241