Alain Chautard
1 min readMar 20, 2019

--

You’re welcome! I believe you’re trying to use ng serve to test your element but this is not how you should do it. Elements can only be tested in a “static” way meaning that should import the JS script in a web page then use your custom element and see it work.

Your error indicates that the HTML you’re loading has an app-root and that Angular is trying to bootstrap that element, which should never be the case if Angular is bootstrapped for an individual element.

--

--

Alain Chautard
Alain Chautard

Written by Alain Chautard

Google Developer Expert in Angular, Consultant and Trainer at http://www.angulartraining.com

Responses (1)