Using MDB Lightbox with Angular2


Topic: Using MDB Lightbox with Angular2

Smustyle pro asked 8 years ago

Hi there, I'm creating an Angular 2 Webapp using MDB. I have some troubles including the MDB lightbox addon in a specific component. To test it I copied the whole code of the lightbox demo found on the mdbootstrap.com site and pasted it into the component html template. Afterwards I tried to load the mdb-lightbox-ui.html through the following jQuery code: $("#mdb-lightbox-ui").load("./../../assets/module/mdb-addons/mdb-lightbox-ui.html"); First I added this code snippet to the body of the index.html inside a javascript script-tag. Second I added it to the ngOnInit part of the component. Unfortunately it was no successful to init the mdb lightbox. I received no error in the console or something else. The pictures are displayed correctly, but when I click on the thumbnail to move to the lightbox-view, the picture is displayed like a normal picture in the browser. (No navigation, no mask,..) Can anyone help me to resolve this? Best Regards
Hello Smustyle, Unfortunately, we aren't currently supporting Angular 2. Regards

Smustyle pro answered 8 years ago

I guess it's not a problem of supporting Angular2, but the lightbox must be loaded on a specific place.
Hello Smustyle, I'm really sorry that you had to wait so long for the answer. Our lightbox won't work on angular2 and we don't have a fix for that yet. Currently, we started to work on angular2 version of MDB. We hope to finish it as soon as possible. Regards

Hello,In response to your issue, I wanted to let you know about just released MDBootstrap Angular kit, that may be a sufficient solution to this or any other issues you have had with Angular integration so far.The kit can be found at the following link:https://mdbootstrap.com/angular/It contains all the components you could find in MDB jQuery version.We encourage you to try it out and report any bugs or issues at contact@mdbootstrap.com with [Angular] prefix or create a thread on this forum.Have a great day!


Sebopede commented 5 years ago

This is a follow up comment from Smustyle, the lightbox works but without any zoom transitions or swipe compatability.


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags