【问题标题】:Uncaught TypeError: undefined is not a function In AngularJSUncaught TypeError: undefined is not a function In AngularJS
【发布时间】:2015-09-18 20:55:12
【问题描述】:

我的应用运行良好。但是我使用了http://ruhley.github.io/angular-color-picker/ 的颜色选择器,出现了一些问题。现在我的应用程序也无法启动。我删除了这个颜色选择器仍然一样。 我得到的错误是

Uncaught TypeError: undefined is not a function inside angular.js at

function createInternalInjector(cache, factory) {

function getService(serviceName, caller) {
  if (cache.hasOwnProperty(serviceName)) {
    if (cache[serviceName] === INSTANTIATING) {
      throw $injectorMinErr('cdep', 'Circular dependency found: {0}',
                serviceName + ' <- ' + path.join(' <- '));
    }
    return cache[serviceName];
  } else {
    try {
      path.unshift(serviceName);
      cache[serviceName] = INSTANTIATING;
      return cache[serviceName] = factory(serviceName, caller);
    } catch (err) {
      if (cache[serviceName] === INSTANTIATING) {
        delete cache[serviceName];
      }
      throw err;//<<------GETTING ERROR HERE
    } finally {
      path.shift();
    }
  }
}

【问题讨论】:

  • 是说函数getservice不是函数?它究竟指向哪个部分未定义

标签: angularjs bower-install


【解决方案1】:

通过将 angular-cookies 和 angular-resource 都更新到 1.4.0 来解决问题

【讨论】:

    猜你喜欢
    • 2015-01-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-10-06
    • 2014-08-15
    • 2015-01-14
    相关资源
    最近更新 更多