【发布时间】: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不是函数?它究竟指向哪个部分未定义