Skip to content

Instantly share code, notes, and snippets.

@Rana283
Created September 26, 2014 12:41
Show Gist options
  • Save Rana283/a6a2fa48e07fce745e17 to your computer and use it in GitHub Desktop.
Save Rana283/a6a2fa48e07fce745e17 to your computer and use it in GitHub Desktop.
var angularApp=angular.module('angularApp.directives.toolbarTip', []);
angularApp.directive('toolbarTip', function() {
return {
// Restrict it to be an attribute in this case
restrict: 'E',
scope:{
friend:'=',
title:'='
},
// transclude:true,
replace:true,
// responsible for registering DOM listeners as well as updating the DOM
link: function(scope, element, attrs) {
// toolbar(scope.$eval(attrs.toolbarTip));
element.click(function(){
});
},
templateUrl: "templates/directives/toolbarTip.html"
// controller:function($scope){
// // console.log($scope.friend);
// }
};
});
@Rana283
Copy link
Author

Rana283 commented Sep 26, 2014

Sample Directive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment