欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

ios設(shè)備中angularjs無(wú)法改變頁(yè)面title的解決方法

 更新時(shí)間:2018年09月13日 10:22:48   作者:dusk1712  
今天小編就為大家分享一篇ios設(shè)備中angularjs無(wú)法改變頁(yè)面title的解決方法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧

如下所示:

$rootScope.$watch('title',function(title){
 var body = document.getElementsByTagName('body')[0];
 document.title = title;
 var iframe = document.createElement("iframe");
 iframe.title = '';
 iframe.width = 0;
 iframe.height = 0;
 iframe.setAttribute("src", "/empty.png");

 iframe.addEventListener('load', function() {
 setTimeout(function() {
  iframe.removeEventListener('load');
  document.body.removeChild(iframe);
 }, 0);
 });
 document.body.appendChild(iframe);
});

// 代碼放在app.js中,代碼備份下,預(yù)防下次遇到同樣的問(wèn)題。

以上這篇ios設(shè)備中angularjs無(wú)法改變頁(yè)面title的解決方法就是小編分享給大家的全部?jī)?nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

最新評(píng)論