2017-12-31 163 views
0

これまで私のアドインはさまざまなブラウザでうまく機能していました。最近、いくつかのブラウザではうまくロードされません(コンソールのエラーメッセージはUIの空白ページを表示します)。一部のブラウザではロードされますが、コンソールにはエラーメッセージが表示されます。 localhostでもうまく動作しますが、実稼働環境ではうまく動作しません。ここでは最小のコードです:Chromeの場合

console.log("OfficeHelpers.Utilities.host: " + OfficeHelpers.Utilities.host); 
console.log("OfficeHelpers.Utilities.platform: " + OfficeHelpers.Utilities.platform); 

Office.initialize = function (reason) { 
    jQuery(document).ready(function() { 
     angular.bootstrap(document, ['test']) // it is important to not write 'ng-app="test"' in index.html, otherwise controller will be executed twice 
     console.log("bootstrapped inside Office.initialize!"); 
    }) 
} 

test = angular.module('test', ['ui.router']); 
test.config(['$stateProvider', '$locationProvider', function ($stateProvider, $locationProvider) { 
    $stateProvider 
     .state('addinHomePlus', { 
      url: '/addin/homePlus', 
      template: 'testtest!!!' 
     }) 
    $locationProvider.html5Mode(true); 
}]) 

が、それはUIに空白のページが表示され、ここで$rootScope:infdigとエラーメッセージです:

enter image description here

誰が間違って何を知っていますか?

編集1:私はhttps://cdn.rawgit.com/devote/HTML5-History-API/master/history.jsを使用してhtml5モードを支援しています。私は$rootScopeProvider.digestTtl(3)を設定した場合、私は$rootScope:infdigのために、次のメッセージが表示されました:私はhttps://cdn.rawgit.com/devote/HTML5-History-API/master/history.jsを使用しない場合、この$rootScope:infdigが消え

3 $digest() iterations reached. Aborting! 
Watchers fired in the last 5 iterations: [null,[{"msg":"fn: function(){var a=jb(c.url()),b=jb(l.absUrl()),f=c.state(),g=l.$$replace,m=a!==b||l.$$html5&&e.history&&f!==l.$$state;if(q||m)q=!1,d.$evalAsync(function(){var b=l.absUrl(),c=d.$broadcast(\"$locationChangeStart\",b,a,l.$$state,f).defaultPrevented;l.absUrl()===b&&(c?(l.$$parse(a),l.$$state=f):(m&&h(b,g,f===l.$$state?null:l.$$state),\nk(a,f)))});l.$$replace=!1}"},{"msg":"fn: function(){return d.hash()}","newVal":""}]] 
+0

テンプレートはありますか?最後に? –

+0

'template: 'testtest !!!''に問題があります。 – SoftTimur

答えて

0

。しかし、hereとしてhistory.jsが必要です。

関連する問題