0.0.10 • Published 2 years ago

@zwitch-uat/elements-angular v0.0.10

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

@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.

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.1

2 years ago