@zwitch-uat/elements-angular
TypeScript icon, indicating that this package has built-in type declarations

0.0.10 • Public • Published

@zwitch-uat/elements-angular

Integrate Zwitch Elements into your Angular project.

Steps to integrate

Install the package

npm i @zwitch-uat/elements-angular

Import ZwitchAngularModule & CUSTOM_ELEMENTS_SCHEMA from '@angular/core'

import { ZwitchElementsModule } from '@zwitch-uat/elements-angular';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';

Import defineCustomElements and call this function which registers zwitch-elements

import {defineCustomElements} from '@zwitch-uat/elements-core/loader'
defineCustomElements(window);

Add Module to the imports and set the custom schema

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    ...
    ZwitchElementsModule,
    ...
  ],
  
  schemas:[CUSTOM_ELEMENTS_SCHEMA],
  bootstrap: [AppComponent]
})
export class AppModule { }

That's it you are set to use elements across this module.

Note: To register elements at common place, call defineCustomElements in main.ts and import ZwitchElementsModule in your lazy loaded modules.

Readme

Keywords

none

Package Sidebar

Install

npm i @zwitch-uat/elements-angular

Weekly Downloads

0

Version

0.0.10

License

none

Unpacked Size

274 kB

Total Files

16

Last publish

Collaborators

  • open.money