Search code examples
javascriptangularjsonsen-uimonaca

Can't create popover of onsen-ui


I work on Monaca platform to develop mobile app with onsen ui and angularjs

I want to add popover of onsen like this code:

angular.module('app', ['onsen','ngResource'])

.controller('DropdownController', function($scope) {
  ons.ready(function() {
    ons.createPopover('popover.html').then(function(popover) {
      $scope.popover = popover;
    });
  });
});

But I can't call createPopover! (is undefined!)


Solution

  • Popover was added in 1.2.0, it looks like you're using an earlier version. If you update to 1.2.1 (latest) version, you should be able to use it.