Skip to content

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

Open
@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?

Activity

RupenAnjaria

RupenAnjaria commented on Jun 21, 2023

@RupenAnjaria

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @svetlanapuro@RupenAnjaria

        Issue actions

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