2016-07-25 20 views
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做工不错了模态的,但里面没有

回答

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

改变它

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

我通过添加标签 –

+0

以外的按钮来解决此问题,并非常感谢您 –