Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ngx-bootstrap tabs don't work in modal opened through leaflet

Relevant code : https://stackblitz.com/edit/angular-ngx-leaflet-tests-kz7kc7 When you click on a marker, modal opens but tabs inside don't work. There is some problem with angular change detection. It works if I manually detect changes. How can I open modal so it would "stay connected" to angular's change detection?

like image 403
Krk Črn Avatar asked Sep 13 '25 07:09

Krk Črn


1 Answers

Apparently angular has zones and leaflet runs some code outside of angular's change detecting zone. According to this, there is an easy fix and it works.

like image 113
Krk Črn Avatar answered Sep 15 '25 20:09

Krk Črn