Skip to content

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

@svetlanapuro

Description

@svetlanapuro

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions