2

Hello I have a problem while trying to use webpack to bunlde my files and ngDialog to get a popup to work. the popup will only show a "Hello!" message right now.

This is my function:

function popupEditOptions(){
    ngDialog.open({
        template: 'src/req/edit/editOptions.html',
        scope: $scope
    });
};

When i do this i get an error with:
GET http://localhost:3000/src/req/edit/editOptions.html 404 (Not Found)

I can require the html file like this:

function popupEditOptions(){
    ngDialog.open({
        template: require('src/req/edit/editOptions.html'),
        scope: $scope
    });
};

But now i get this error that writes out the content of the html file:
GET http://localhost:3000/Hello! 404 (Not Found)

Samuel
  • 137
  • 1
  • 16

1 Answers1

2

It seems that it may be an bug in ngDialog, referenceing to this github question:https://github.com/likeastore/ngDialog/issues/390.

But you can get it to work by using the plain:true property.

ngDialog.open({
   plain: true,
   template: require('src/req/edit/editOptions.html'),
   scope: $scope
});
Devl11
  • 220
  • 2
  • 10