0

Id like to open a modal on tab select am using UI Bootstrap plugin components , everything seem to work ie the tabs open but , the modal page does not seem to be called on selecting the last tab , below is my code : All Controller function are being called as vm

Controller

     function tab_open_call (size) {

      var modalInstance = $uibModal.open({
         animation: $scope.animationsEnabled,
         templateUrl: '/cashier/views/cashier.angular_components.modal',
         size: size

       });

   }

View

<uib-tabset>
   <uib-tab heading="Profile">
   </uib-tab>
   <uib-tab heading="Address">
   </uib-tab>
  <uib-tab select=" vm.tab_open_call" heading="Setting">
   </uib-tab>
  </uib-tabset>

Modal View

<div class="modal-header">
    <h3 class="modal-title">I'm a modal!</h3>
 </div>
<div class="modal-body">
  <p>Something here</p>
</div>

Please help out ?

RESOLVED : I SIMPLY RESOLVED THIS BY ADDING THE $uibModal SERVICE TO THE CONTROLLER , WHICH WAS NOT BEING CALLED !

Jimmy Obonyo Abor
  • 7,335
  • 10
  • 43
  • 71

1 Answers1

1

You forgotten the size parameter? Try:

<uib-tab select="vm.tab_open_call('md')" heading="Setting">
</uib-tab>
manzapanza
  • 6,087
  • 4
  • 39
  • 48