Skip to content

Instantly share code, notes, and snippets.

@ezzabuzaid
Created November 2, 2022 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ezzabuzaid/3c1ff30798f7609750936699dcf6cd84 to your computer and use it in GitHub Desktop.
Save ezzabuzaid/3c1ff30798f7609750936699dcf6cd84 to your computer and use it in GitHub Desktop.
import { createCustomElement } from '@angular/elements';
import { createApplication } from '@angular/platform-browser';
(async () => {
const app = await createApplication({
providers: [],
});
const WebComponent = createCustomElement(YourComponent, {
injector: app.injector,
});
customElements.define('universal-datagrid', WebComponent);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment