Last active
August 16, 2016 09:15
-
-
Save derlin/ba2e7cb1f019056741e1ae647a3d7fcd to your computer and use it in GitHub Desktop.
AngularJS 1.X semantic-ui helpers.
This file contains hidden or 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
// miscellanous directives and helpers for applications using AngularJS 1.X with the semantic-ui framework |
This file contains hidden or 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
/** | |
* @ngdoc directive | |
* @name semanticPopup | |
* @restrict A | |
* @description initialise a semantic popup. | |
* See <a href="http://semantic-ui.com/modules/popup.html">popups</a>. | |
* @param "hover|click|focus" when the popup should be shown. | |
*/ | |
//.directive( 'semanticPopup', semanticPopup ) | |
function semanticPopup(){ | |
return { | |
restrict: 'A', | |
link : function( scope, element, attr ){ | |
var on = attr.semanticPopup || 'hover'; | |
element.popup( { | |
on: on | |
} ); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment