0

I would like to use angular elements for widgets here.

I went through the angular.io example and also angular-aio-src

I am missing something here. Here is the demo.

I am getting this error :

Component ContentNotAvalilableComponent is not part of any NgModule or the module has not been imported into your module.

All the examples I have seen , are created as separate modules/ manual bootstrapping is done to embed that module. But I am trying something like angular aio does. load angular elements lazily with AppComponent bootstrapped. Not sure whats going wrong here?

KiraAG
  • 773
  • 4
  • 19
  • `CustomElementsModule` is missing the declaration and the export of the `ContantNotAvailableComponent` – Jacopo Sciampi Dec 11 '18 at 07:41
  • Yeah but since, it is a custom element , I have added it as part of `entryComponents` array. – KiraAG Dec 11 '18 at 07:48
  • You need anyway to declare it in some modules. If you just add the component to the array of declaration in the `CustomElementsModule` your code will works fine. – Jacopo Sciampi Dec 11 '18 at 07:49
  • Yeah it works that way. But my custom element is still not working . The element tag is appended, but still the content is not displayed. – KiraAG Dec 11 '18 at 08:01

1 Answers1

1

import javascript in index.html

<script src="https://unpkg.com/@webcomponents/webcomponentsjs@2.1.3/custom-elements-es5-adapter.js"></script>

But see this link https://www.npmjs.com/package/ngx-build-plus

user1748379
  • 53
  • 1
  • 9