Reputation: 482
I want to add/create a new Angular component inside an existing pure Javascript library so that the library can be easily integrated within Angular apps. The Angular component will essentially be a wrapper for the library. We already added a React wrapper to the library for this same purpose.
Given that Angular is a framework solution, and I don't want to drastically change the structure of the existing JS project, is it possible to add Angular to the existing JS project? If so, how is that done from a high-level? I normally use Angular-cli v6 in my other projects.
Upvotes: 4
Views: 1056
Reputation: 24472
Angular elements are Angular components packaged as custom elements, a web standard for defining new HTML elements in a framework-agnostic way.
Building a Custom Element Using Angular Elements
Angular Elements — A Practical Introduction To Web Components With Angular 6
Browser support for custom elements
Chrome Supported natively.
Opera Supported natively.
Safari Supported natively.
Firefox Set the
dom.webcomponents.enabled
anddom.webcomponents.customelements.enabled
preferences totrue
. Planned to be enabled by default in version 60/61.Edge Working on an implementation.
Upvotes: 5