404 modal - Error loading template in modalHtml

Asked

Viewed 27 times

-1

I am in a system that when you click on the "magnifying glass" is opened a modal with the information of History. But I am getting an error that the HTML page is not being found. Gulp is correct, when debugging I can see the path address, but is giving the following errors (follow the code too):

MinhaFactory.recuperarHistorico(filtro) //filtro com os dados certo
    .then(function (response) {
    var config = {
        vm: {
            listaHistorico: response.data.historico //está retornando os dados corretamente
        },
        size: "xl",
        header: "Meu Titulo",
        html: "/app/modulos/minha-pasta/view/historico.html"
    };

    modalService.exibirModalHtml(config);
})
    .catch(function (error) {
        console.log(error);

        modalService.exibirMensagemErro("MEU TITULO | ERRO", error);
    });


var exibirModalHtml = function (config, callback) {
    var modalInstance = $uibModal.open({
        animation: !0,
        templateUrl: 'app/modulos/modal/views/modal-html.html'
        controller:"ModalHtmlController",
        controllerAs: "vm",
        size: config.size || "md"
        backdrop: 'static',
        resolve: {
            data: function () {
                return {
                    "vm": config.vm,
                    "header": config.header,
                    "html": config.html,
                    "buttons": config.buttons || [],
                    "callback": callback
                }
            }
        }
    });
    return modalInstance.result;
}

inserir a descrição da imagem aqui inserir a descrição da imagem aqui inserir a descrição da imagem aqui

  • tries to clear the cache, run Gulp again and redo the test.

1 answer

0


The error may be in the URL that Angularjs is looking for, check it as follows Verifique a URL

Copy the URL you are trying to request, if it gives 404 very likely that the error is on

templateUrl: 'app/modulos/modal/views/modal-html.html'

Browser other questions tagged

You are not signed in. Login or sign up in order to post.