Все, что вам нужно сделать две вещи:
Добавить зависимость так, что угловая в состоянии найти поповер
Добавить css для бутстрапа для лучшего визуального
HTML:
<div ng-app="testapp">
<div ng-controller="testCtrlr">
<div mdpagination pages="pages"></div>
</div>
</div>
Контроллер:
var MyDirectives = angular.module('testapp', ['ui.bootstrap']);
MyDirectives.controller('testCtrlr', ['$scope', function ($scope) {
$scope.pages = 'hover me to get popover'
}]);
MyDirectives.directive("mdpagination", function() {
console.log('DIRECTIVE!');
return {
template: '<h1><a popover-placement="bottom" popover="sd" popover-trigger="mouseenter">{{pages}}</a></h1>',
replace: true,
restrict: 'A',
// scope: {pages:'@'}, //default
link: function (scope, element, attrs) {
console.dir(scope.pages);
}
}
});