1
my modal:
<div class="modal">

  <!-- Modal header bar -->
  <ion-header-bar class="bar-secondary ">
    <h1 class="title ">New Task</h1>
    <button class="button button-clear button-positive " ng-click="closeNewTask() ">Cancel</button>
  </ion-header-bar>

  <!-- Modal content area -->
  <ion-content>

    <form ng-submit="">
      <div class="list ">
        <div class="item">
          <label class="item item-input ">
            <input type="text " placeholder="What do you need to do? ">


            <button type="button" class="button button-icon" ng-click="openPopover($event)">
             <i class="icon ion-information-circled red font-size-25"></i> 
            </button>
            </label>
        </div>

      </div>

      <div class="padding ">
        <button  type="submit" class="button button-block button-positive ">Create Task</button>
      </div>
    </form>

  </ion-content>

</div>

这是我的模态,它工作正常,但模态内的“图标信息”不起作用......我在控制器和函数中放了一个 $ionicPopover

var template = '<ion-popover-view><ion-header-bar> <h1 class="title">My Popover Title</h1> </ion-header-bar> <ion-content> Hello! </ion-content></ion-popover-view>';

  $scope.popover = $ionicPopover.fromTemplate(template, {
    scope: $scope
  });

  $scope.openPopover = function($event) {
    $scope.popover.show($event);
  };

everythink 在模态外效果很好,但在里面却不行

4

1 回答 1

0
$scope.openPopover = function($event) {
    $scope.popover.show($event);
  };

将其更改为

$scope.openPopover = function(e) {
    $scope.popover.show(e);
  };
于 2016-07-25T08:42:57.740 回答