0

I'm trying to use functionality provided c8y.ui module (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).

However when I inject a dependancy from the c8y.ui module to my controller I get the following error message (when trying to inject c8yAlert as dependancy)

angular.js:9997 Error: [$injector:unpr] Unknown provider: c8yAlertProvider <- c8yAlert

Any ideas on how I could get the c8y.ui module working too?

severi
  • 97
  • 1
  • 6

1 Answers1

1

Unfortunately, c8y.ui is not included in Smart apps toolkit. However you can use one of alert/notification javascript libraries out there (see here).


Edit: Nevermind, apparently it's included.


Basically, you are not supposed to use c8yAlert in Smart apps toolkit. Most of the stuff in c8y.ui rely on custom Cumulocity DOM, styles and combination of them in a particular way. If you need to display alerts/notifications, you should rely on 3rd party libraries.

c8yAlert is documented because you can use it in a Cumulocity plugin code.

mostruash
  • 4,169
  • 1
  • 23
  • 40