I'm attempting to replicate a feature using Onsen 2.0 without AngularJS, similar to this CodePen example:
http://codepen.io/argelius/pen/zxGEza?editors=1010
var app = ons.bootstrap();
app.controller('DropdownController', function($scope) {
ons.createPopover('popover.html').then(function(popover) {
$scope.popover = popover;
});
});
In essence, how can I trigger a popover in JavaScript without utilizing ons.bootstrap() since it causes an error when AngularJS isn't included?
The structure of my page looks like this:
<div class="right">
<ons-toolbar-button onclick="????">
<ons-icon icon="ion-navicon" style="font-size: 32px; width: 1em;"></ons-icon>
</ons-toolbar-button>
</div>
<ons-template id="popover.html">
<ons-popover direction="down" cancelable>
<ons-list>
<ons-list-item modifier="tappable">Option 1</ons-list-item>
<ons-list-item modifier="tappable">Option 2</ons-list-item>
<ons-list-item modifier="tappable">Option 3</ons-list-item>
</ons-list>
</ons-popover>
</ons-template>