$ uibModal在我的angular webpack项目

时间:2017-04-17 08:00:58

标签: angularjs webpack angular-ui-bootstrap

我在按钮的ng-click下方调用功能。

vm.updateSourceAndVisibility = function(skus) {
  $log.info("In updateSourceAndVisibility");
  var modal = $uibModal.open({
    animation: true,
    template: require('./source-selection/source.selection.html'),
    controller: require('./source-selection/source.selection.controller.js'),
    controllerAs: 'sourceSelectCtrl',
    backdrop : 'static',
    size: 'md'
  });
};

当我点击该按钮时,只有

出现一个模态
/src/app/pages/src/source-selection/source.selection.html

但是 source.selection.html 有这个HTML,

<form name="sourceSelectForm" novalidate>

  <!-- modal header -->
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-label="Close" ng-click="sourceSelectCtrl.close()"><span aria-hidden="true">&times;</span></button>
      <h4 class="modal-title">Select Sources</h4>
  </div>

  <!-- modal body -->
  <div class="modal-body">
      <!-- Source information -->
      <div class="row">
        I want to put something here
      </div>
  </div>

  <!-- modal footer -->
  <div class="modal-footer">
    <button type="button" class="btn btn-default" ng-click="sourceSelectCtrl.close()">Cancel</button>
    <button type="submit" class="btn btn-primary" ng-click="sourceSelectCtrl.submit()">Select</button>
  </div>

</form>

我做错了什么?

0 个答案:

没有答案