Search code examples
angularjsmapbox-gl-jsnebularngx-admin

ngx-admin add mapbox in new page component


how I want to add mapbox in <nb-card-body> in new pages i had created ?

I've already add html simple mapbox but nothing show on my mapsla page...

my component to add mapbox is mapsla and this project is based on ngx-admin starter-kit

mapsla.module.ts

mapsla.component.ts

mapsla.component.html

Project structure

screen shot Error in ngx-admin web browser , map not show


Solution

  • You cannot insert html tag into the nb-card-body as html is a container element for other elements. Since ngx-admin is built on top of Angular, try using corresponding library https://github.com/Wykks/ngx-mapbox-gl. Hope this helps.