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>
这是我的模态它工作正常,但&#34;图标信息&#34;在模态内部没有工作...我在控制器和函数中放置$ 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 :(得分:0)
$scope.openPopover = function($event) {
$scope.popover.show($event);
};
将其更改为
$scope.openPopover = function(e) {
$scope.popover.show(e);
};