2014-12-11 38 views
0

我發佈了toastr.error("a message")但出現此錯誤。它發生在_setContainer當它$animate.enter().then(function())。 我錯過了什麼?使用toastr獲取'無法讀取屬性',然後'未定義'

function _setContainer(options) { 
    if(container) { return containerDefer.promise; } // If the container is there, don't create it. 

    container = angular.element('<div></div>'); 
    container.attr('id', options.containerId); 
    container.addClass(options.positionClass); 
    container.css({'pointer-events': 'auto'}); 
    var body = $document.find('body').eq(0); 
    $animate.enter(container, body).then(function() { 
    containerDefer.resolve(); 
    }); 
    return containerDefer.promise; 
} 
+1

哪裏是'container','containerDefer','$ animate'定義? – 2014-12-11 02:26:41

+0

也只是碰到了這個。我認爲$ animate.enter代碼對於Angular 1.3是新的。你需要使用1.2分支 – Howie 2014-12-11 11:35:40

+0

謝謝傑伊!我現在意識到,我不能只爲我安裝任何鮑爾抓鬥。 – Rainman 2014-12-11 16:57:04

回答

相關問題