Topic: Modal is not wotking

omerabbas pro asked 5 years ago

Hi kindly help . receiving below error when implementing     ModalUncaught Error: Template parse errors: There is no directive with "exportAs" set to "bs-modal" (" waves-light" (click)="" ripple-radius>Launch demo modal</button> <div bsModal [ERROR ->]#basicModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myBasicModalLa"):

omerabbas pro answered 5 years ago

    I just copy it from that link    
<button type="button" class="btn btn-primary relative waves-light" (click)="" mdbRippleRadius>Launch demo modal</button>

<div mdbModal #basicModal="mdb-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myBasicModalLabel" aria-hidden="true" [config]="{backdrop: false, ignoreBackdropClick: true}">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close pull-right" aria-label="Close" (click)="basicModal.hide()">
                    <span aria-hidden="true">×</span>
                <h4 class="modal-title w-100" id="myModalLabel">Modal title</h4>
            <div class="modal-body">
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary waves-light" aria-label="Close" (click)="basicModal.hide()" mdbRippleRadius>Close</button>
                <button type="button" class="btn btn-primary relative waves-light" mdbRippleRadius>Save changes</button>

Parik1990 pro commented 5 years ago

The problem might be because they updated components before they made the latest version available. In modal wherever you find mdb-modal change it to bs-modal or if any other prefix that was used earlier and the modal should work fine.

omerabbas pro commented 5 years ago

@Parik yes you are absolutely right they updated the docs to latest version without updating the components. i bought the angular version three weeks ago but now i am unable to use docs because i have 4.2 MDB Angular. BTW Modal is still not working i try to change MDB-Modal

Parik1990 pro commented 5 years ago

<pre>bsModal #frame="bs-modal"</pre> Try this and let me know mate. I had similar issue just changed to bs as shown in error and modal worked fine. Hope this works. Hopefully a stable version is released!

omerabbas pro commented 5 years ago

@Parik Thanks Bro ! its worked like a charm

Parik1990 pro commented 5 years ago

You're welcome! cheers mate :)

Magdalena Obalska free answered 5 years ago

Hi, send me your template code, please.

omerabbas pro commented 5 years ago

may be it is because of my mdb version is 4.2 and documents version is 4.4. how could i able to get MDB pro 4.4

Please insert min. 20 characters.


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



Specification of the issue

  • User: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No