无法在 cumulocity 的 hello-core-api 示例应用程序之上使用 c8y.ui 功能
Not able to use c8y.ui functionality on top of cumulocity's hello-core-api example application
我正在尝试使用 c8y.ui 模块 (http://resources.cumulocity.com/documentation/jssdk/latest/#/core/c8y.ui) in an application I'm building on top of Cumulocity's hello-core-api application (https://bitbucket.org/m2m/cumulocity-examples/src/0fbc406e849ecba3a01526ebef8d4d8bb1f7f374/hello-core-api) 提供的功能。
然而,当我从 c8y.ui 模块向我的控制器注入依赖项时,我收到以下错误消息(尝试将 c8yAlert 作为依赖项注入时)
angular.js:9997 错误:[$injector:unpr] 未知提供者:c8yAlertProvider <- c8yAlert
关于如何让 c8y.ui 模块也能正常工作有什么想法吗?
很遗憾,c8y.ui
未包含在 Smart apps toolkit. However you can use one of alert/notification javascript libraries out there (see here 中)。
编辑:没关系,显然它包含在内。
基本上,您不应该在智能应用程序工具包中使用 c8yAlert
。 c8y.ui
中的大部分内容都依赖于自定义 Cumulocity DOM、样式以及它们以特定方式的组合。如果你需要显示alerts/notifications,你应该依赖第3方库。
c8yAlert
已记录在案,因为您可以在 Cumulocity 插件代码中使用它。
我正在尝试使用 c8y.ui 模块 (http://resources.cumulocity.com/documentation/jssdk/latest/#/core/c8y.ui) in an application I'm building on top of Cumulocity's hello-core-api application (https://bitbucket.org/m2m/cumulocity-examples/src/0fbc406e849ecba3a01526ebef8d4d8bb1f7f374/hello-core-api) 提供的功能。
然而,当我从 c8y.ui 模块向我的控制器注入依赖项时,我收到以下错误消息(尝试将 c8yAlert 作为依赖项注入时)
angular.js:9997 错误:[$injector:unpr] 未知提供者:c8yAlertProvider <- c8yAlert
关于如何让 c8y.ui 模块也能正常工作有什么想法吗?
很遗憾,c8y.ui
未包含在 Smart apps toolkit. However you can use one of alert/notification javascript libraries out there (see here 中)。
编辑:没关系,显然它包含在内。
基本上,您不应该在智能应用程序工具包中使用 c8yAlert
。 c8y.ui
中的大部分内容都依赖于自定义 Cumulocity DOM、样式以及它们以特定方式的组合。如果你需要显示alerts/notifications,你应该依赖第3方库。
c8yAlert
已记录在案,因为您可以在 Cumulocity 插件代码中使用它。