I have an Angular app which looks something like an iPad app. There is a navbar with buttons and dropdown menus. The navbar is declared in my index.html file. Now in my different pages, i want to add functionality to the navbar. Right now i am adding buttons to the navbar like this
$rootScope.actionButtons.push({
icon: 'icon-history',
content: '<select ng-change="previewRevision()" ng-model="revision">\
<option value="">--Backlog--</option>
<option ng-repeat="old in journal.backlog" value="{{old.revision}}">Revision {{old.revision}}</option>
</select>',
title: 'Visa backlog'});
The content in this view opens up in a popover when a button in the navbar is pressed. However, since the markup for rendering the button is outside of the controller no data is bound to it, which makes it kind of useless.
How can i bind data which is outside of the current scope?