SoFunction
Updated on 2025-04-04

Angularjs dynamically change title title (compatible with ios)

I won’t say much nonsense, I will just post the code to you. The specific code is as follows:

<pre name="code" class="javascript">('', []) 
  .config(function($httpProvider) { 
    $['Content-Type']='application/x-www-form-urlencoded;charset=utf-8'; 
//Change the format of content-type in the header  }) 
.controller('loginCtrl',['$scope','$http',function($scope,$http){}]) 
//Compatible with ios dynamically changing title title.run(['$location','$rootScope',function($location, $rootScope){  
  $rootScope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState, fromParams) {  
   $ =   
  });  
  $rootScope.$watch('title',function(title){ 
    var body = ('body')[0]; 
     = title; 
    var iframe = ("iframe"); 
     = 'Login'; 
     = 0; 
     = 0; 
     = '///'; 
     = 'none'; 
    ('load', function() { 
      setTimeout(function() { 
        // ('load'); 
        (iframe); 
      }, 0); 
    }); 
    (iframe); 
  }); 
}]); </pre><br> 
<br> 
<pre></pre> 
&lt;pre code_snippet_ snippet_file_name="blog_20161229_4_8475823" name="code" class="javascript"&gt;//Route<pre name="code" class="javascript"> .state('deliciousFood',{   title:'Food accommodation', 
   url:'/deliciousFood', 
   templateUrl:'/hq/views/deliciousFood/', 
   controller:'deliciousFoodCtrl', 
   resolve:{ 
    loadMyCtrl:['$ocLazyLoad',function($ocLazyLoad){ 
     return $([ 
      '/hq/views/deliciousFood/', 
      ]).then(function(){}) 
    }] 
   }  
  })&lt;/pre&gt;&lt;br&gt; 
&lt;pre&gt;&lt;/pre&gt; 
&lt;br&gt; 
&lt;/pre&gt; 

The above is the Angularjs dynamically changing title title (compatible with ios) introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to everyone in time. Thank you very much for your support for my website!