Created
February 9, 2015 18:52
-
-
Save gr4b4z/07440f4cb5ebab27bb9b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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