我正在使用loopback-angular-sdk并且在使用 updateAttributes 函数时遇到了一个奇怪的错误:
MyModel.prototype$updateAttributes is not a function
它发生在所有型号上。我有点怀疑依赖问题。
我在 index.html 中包含了 angular-resource.js,所以这不是问题。
这是我的 bower.json:
{
"name": "angular",
"version": "1.0.0",
"dependencies": {
"bootstrap": "^3.3.7",
"angular": "1.6.1",
"angular-route": "latest",
"angular-material": "^1.1.1",
"angular-ui-router": "^0.3.2",
"angular-resource": "1.6.1",
"material-calendar": "^0.2.14",
"textAngular": "^1.5.16",
"jquery": "^3.1.1",
"material": "^0.1.1",
"angular-material-data-table": "^0.10.10",
"moment": "^2.17.1",
"angular-translate": "^2.13.1",
"angular-translate-loader-static-files": "^2.13.1",
"angular-translate-storage-local": "^2.13.1",
"angular-animate": "1.6.1",
"angular-aria": "1.6.1",
"angular-recaptcha": "^4.0.3",
"angular-i18n": "1.6.1",
"angular-dynamic-locale": "^0.1.32"
},
"resolutions": {
"angular": "1.6.1",
"angular-material": "^1.1.1"
}
}
任何帮助将不胜感激。谢谢!