0.0.5 • Published 3 years ago
alt-swap v0.0.5
AltLabs web component called alt-swap made in stencil
To add to a angular project
- npm install
- npm install alt-swap --save
- in app.module.ts, change import { NgModule } from '@angular/core'; to import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; @NgModule({ ... schemas: CUSTOM_ELEMENTS_SCHEMA ... })
- in main.ts, add import { defineCustomElements } from 'alt-swap/loader'; and defineCustomElements();
- and now you can call the component using the tag
To add to a rect project
- npm install
- npm install alt-swap --save
- in index.js, import { applyPolyfills, defineCustomElements } from 'alt-swap/loader' applyPolyfills().then(() => { defineCustomElements(); });
- and now you can call the component using the tag
To add to a vue project
- npm install
- npm install alt-swap --save
- in main.js, import { applyPolyfills, defineCustomElements } from 'alt-swap/loader'; applyPolyfills().then(() => { defineCustomElements(); });
- and now you can call the component using the tag