2017-12-31 40 views
0

이전에는 추가 기능이 여러 브라우저에서 잘 작동했습니다. 최근에 일부 브라우저에서는 제대로로드되지 않습니다 (콘솔의 오류 메시지는 UI의 빈 페이지 만 보여줍니다). 일부 브라우저에서는로드되지만 콘솔에는 오류 메시지가 표시됩니다. localhost에서도 잘 작동하지만 생산에는 이상하지 않습니다.

크롬에서
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); 
}]) 

, 그것은 $rootScope:infdig와 오류 메시지를 UI에 빈 페이지를 표시하고 현재 위치 :

enter image description here

사람이 무엇이 잘못 알고 있나요 여기에 최소 코드는?

편집 1 : 나는 을 사용하여 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이 필요합니다.

관련 문제