likeastore / ngDialog

Modals and popups provider for Angular.js applications
http://likeastore.github.io/ngDialog
3.14k stars 692 forks source link

ngDialog.open doesn't work with a script tag, only with an external html file #588

Open iloveip opened 6 years ago

iloveip commented 6 years ago

What version of ng-dialog are you using? 1.4.0

What version of AngularJS are you using? 1.5.7

What browsers are affected? Chrome, Safari

Please provide either a JSFiddle, Plunkr example that replicates the issue

Please describe the issue I have a script tag:

<script type="text/ng-template" id="modal">
    <h1>Template heading</h1>
</script>

And the following code for ngDialog.open:

$scope.openModal = function () {
        ngDialog.open({ template: 'modal' });
      };

But it doesn't work and says that http://localhost:4000/modal is not found.

What did you expect to happen? Make it work with a script tag.

What actually happened? It only works with an external modal.html file.

Hi there,

How can I make ngDialog.open work with a script tag inside the same file?

RupenAnjaria commented 1 year ago

Were you able to find any solution for this? I am also facing the same issue.