# Popover not working after adding other functions

**URL:** <https://forum.ionicframework.com/t/popover-not-working-after-adding-other-functions/73427>\
**Category:** ionic-v1\
**Created:** [December 16, 2016, 3:46am UTC](https://forum.ionicframework.com/t/popover-not-working-after-adding-other-functions/73427 "2016-12-16T03:46:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![itdogQ](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/itdogq/32/105336_2.png) [@itdogQ](https://forum.ionicframework.com/u/itdogQ)\
**Post date:** [December 16, 2016, 3:46am UTC](https://forum.ionicframework.com/t/popover-not-working-after-adding-other-functions/73427/1 "2016-12-16T03:46:40Z")

</div>

Hi everyone, I am creating some popover window in my ionic.  
Originally I have tested and they were working to display to popover.  
But after I have added some codes for other functionality, then the popover window did not shown up.  
When I clicked on a button, the whole screen with be cover with a gradient layer (as the background of the popover window). But I can’t see any window appear on my screen. I can quit the gradient layer by clicking any space on my screen.

And below are my codes:

```
<button class="button icon ion-gear-a" ng-click="popover.show($event)"></button>

<script id="templates/popover.html" type="text/ng-template">
  <ion-popover-view style="height:160px; width:100px; text-align:center;">
    <ion-content>
      <div class="list">
        <a class="item" href="#">Chinese</a>
        <a class="item" href="#">English</a>
        <a class="item" href="#">Setting</a>
      </div>
    </ion-content>
  </ion-popover-view>
</script>

myIonic.controller('AppCtrl', function($scope, $ionicPopover) {

  $ionicPopover.fromTemplateUrl('templates/popover.html', {
    scope: $scope,
  }).then(function(popover) {
    $scope.popover = popover;
  });

});
```
