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?

4
  • CustomElementsModule is missing the declaration and the export of the ContantNotAvailableComponent Commented Dec 11, 2018 at 7:41
  • Yeah but since, it is a custom element , I have added it as part of entryComponents array. Commented Dec 11, 2018 at 7: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. Commented Dec 11, 2018 at 7: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. Commented Dec 11, 2018 at 8:01

1 Answer 1

1

import javascript in index.html

<script src="https://unpkg.com/@webcomponents/[email protected]/custom-elements-es5-adapter.js"></script>

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.