Не удалось загрузить шаблон: uib / template / modal / window.html

Я чувствую, что я пытался все, и я все еще получаю ошибку:

Не удалось загрузить шаблон: uib / template / modal / window.html

в в мой индексный файл я добавил следующее:

<script src="node_modules/angular-ui-bootstrap/dist/ui-bootstrap.js"></script>
<script src="node_modules/angular-ui-bootstrap/dist/ui-bootstrap-tpls.js"></script>

в свой файл приложения я добавил:

    'ui.bootstrap', 

И в свой файл контроллера я добавил следующее:

$uibModal

и

this.openPayment = function () {
    var modalInstance = $uibModal.open({
        ariaLabelledBy: 'modal-title',
        ariaDescribedBy: 'modal-body',
        templateUrl: 'payment.html',
        controller: 'paymentController',
        controllerAs: '$ctrl',
        size: 'lg',
    });
}

в моем paymentController я добавил следующее:

angular.module('Payment').controller('paymentController', function ($uibModalInstance) {
    var ctrl = this;
});

И payment.html:

    <div class="modal-header">
    <h3 class="modal-title" translate="ACADEMY.EDIT.COURSES.CREATE"></h3>
</div>
<div class="modal-body">
</div>
<div class="lb-modal-footer">
    <a class="btn btn-grey" tooltip="{{ 'TOOLTIP.CANCEL' | translate }}" ng-click="CTRL.cancel()"><i
            class="fa fa-ban"></i></a>
    <button class="btn btn-success m-l-xs {{CTRL.academyCourse.course ? '':'disabled'}}" tooltip="{{ 'TOOLTIP.SAVE_AND_EXIT' | translate }}" ng-click="CTRL.addCourse()"><i
            class="fa fa-check-square-o"></i></button>
</div>

Так может любой скажите мне, что я сделал не так?

8
задан Marc Rasmussen 10 December 2016 в 19:31
поделиться