Skip to content

Instantly share code, notes, and snippets.

@gr4b4z
Created February 9, 2015 18:52
Show Gist options
  • Save gr4b4z/07440f4cb5ebab27bb9b to your computer and use it in GitHub Desktop.
Save gr4b4z/07440f4cb5ebab27bb9b to your computer and use it in GitHub Desktop.
app.directive('myFoot', function () {
return {
restrict: 'E',
replace: true,
template: function(element, attrs)
{
// return '<span title=""><sup>('+attrs.nr+')</sup></span>';
// return '<span popover="qq" data-html="true" popover-trigger="mouseenter"><sup>('+attrs.nr+')</sup></span>';
return '<span popover="{{txt}}" popover-placement="top" popover-append-to-body="true" popover-trigger="mouseenter">('+
attrs.nr+
')</span>';
//Zmieniłem qq na {{txt}}
},
link: function(scope,element,attrs)
{
// element.attr("title", scope.subnotesArray[attrs.nr-1]);
// var span = element.children(0);
// element.attr("popover", "abc"); //scope.subnotesArray[attrs.nr-1]);
//
scope.txt = "abc";
//wywaliłem wszystko, i ustawiam zmienną txt na abc. Na widoku automatycznie się pokaże.
}
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment