使用 toastr 获取"无法读取未定义的属性'然后'"



我发出了toastr.error("a message")但得到这个错误。它发生在_setContainer,当它确实$animate.enter().then(function()).我错过了什么?

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;
}

angular@1.2 支持的角度 toastr 版本是 0.3.0

最新更新