1
<td>
    <input type="checkbox" class="checkBox" 
        ng-model="alert.acknowledged" 
        ng-disabled="alert.acknowledged" 
        ng-click="onacknowledgedClick(alert)">
</td>

I have a checkbox for acknowledged column, when the user clicks on the checkbox, it has display a dialog pop up asking for do you want to acknowledge through phone, text or email?

Can someone help me with the Angular JS concept? I am new to this.

4
  • ng-change is more preferred here instead of click. Commented Nov 3, 2016 at 15:03
  • It would help if you showed the function and asked a clear question. What is it doing/not doing and what should it be doing instead? Commented Nov 3, 2016 at 15:08
  • Show us what generates the popup Commented Nov 3, 2016 at 15:26
  • It should show the dialog pop up with 3 radio buttons text, phone or email. Commented Nov 3, 2016 at 15:37

1 Answer 1

1
angular.module('app','ngAnimate','ui.bootstrap']).controller("Hello",function($scope,$modal){
$scope.selectedAckOption ="NONE";
$scope.onacknowledgedClick=function(al) {
  var modalInstance = $modal.open({
  templateUrl: 'stackedModal.html',
  controller: 'ModalInstanceCtrl',
  size:'md',
  resolve: {}
});
modalInstance.result.then(function (selectedItem) {
  $scope.selectedAckOption = selectedItem;
}, function () {
  console.log('Modal dismissed at: ' + new Date());
});
};
}).controller("ModalInstanceCtrl",function($scope,$modalInstance){
  $scope.saveOption = function() {
   $modalInstance.close($scope.ackOption);
 };
});

Complete solution - https://plnkr.co/edit/VnAv67AMrykf6CEyrAiv?p=preview

Sign up to request clarification or add additional context in comments.

1 Comment

@puneethSrikanta welcome. mark it as answer if it helped solve your issue.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.