0.0.10 • Published 2 years ago

spatial-web-component v0.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years 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

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

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago