0.0.10 • Published 12 months ago

spatial-web-component v0.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

Spatial-Frontend

Angular

Install

$ npm install spatial-web-component

How to import the spatial map web component

In the app.module import the spatial-frontend and CUSTOM_ELEMENTS_SCHEMA from the @angular/core

app.module.ts
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; 

@NgModule({ 

  schemas: [CUSTOM_ELEMENTS_SCHEMA], 

}) 

In the app.component.ts import the webcomponent from the package and define it in the customElements.define function which takes in two parameters ,the web-component-tag name and the second one is the name of the web-component

main.ts
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { defineCustomElements } from 'spatial-web-component/loader';
import { AppModule } from './app/app.module';


platformBrowserDynamic().bootstrapModule(AppModule)
  .catch(err => console.error(err));

  defineCustomElements(window);
 
app.component.html
<br-map height="100vh" width="100vw"></br-map>
0.0.10

12 months ago

0.0.9

12 months ago

0.0.8

12 months ago

0.0.7

12 months ago

0.0.6

12 months ago

0.0.4

12 months ago

0.0.3

12 months ago

0.0.2

12 months ago

0.0.1

12 months ago