dwmkerr / angular-modal-service

Modal service for AngularJS - supports creating popups and modals via a service.
MIT License
626 stars 321 forks source link

Template can not found. #218

Open Deimos620 opened 7 years ago

Deimos620 commented 7 years ago

I am using angular-modal-service as modal service of Angular based web application I am building. Here is my code.

 ModalService.showModal({
            templateUrl: "views/modals/edit_report_draft.html",
            controller: "DraftReportController"
        }).then(function(modal){
            modal.element.modal();
            console.log("modal displayed");
        })

But, when I click the button to show up modal, keep getting this error:

http://localhost:8001/views/modals/edit_report_draft.html 404 (Not Found)

The path of modal template is relative path from angular application root folder. Would you like to help me to fix this problem? It seems it requests template from the server, so should I config routing for this modal template? I am using Angular v1.6