Created
October 12, 2013 06:19
-
-
Save thebigredgeek/6946437 to your computer and use it in GitHub Desktop.
weird bug
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
/** | |
* This controller is used by youtubeItem directives | |
* @name angulartodo#youtubeItemController | |
* @param {Object} $scope An instance of $scope | |
* @param {Object} $attrs An object containing html attributes bound to this directive | |
*/ | |
angular.module('angulartodo').controller('youtubeItemController',[ | |
'$scope','$attrs', | |
function($scope, $attrs){ | |
console.log("hello world!"); | |
$scope.text = $attrs.text; //bind the text | |
}]); | |
/** | |
* This directive renders a youtube item for the todo list | |
* @name angulartodo#yotubeItem | |
* @return {Object} Directive definition | |
*/ | |
angular.module('angulartodo').directive('youtubeItem',[ | |
function(){ | |
var definition = {}; // Definition prototype | |
definition.restrict = "E"; // This restricts the directive to an element form | |
definition.controller = "youtubeItemController"; // Use the youtubeItemController as the controller | |
definition.templateUrl = "directives/youtubeItem.html"; // Use the youtubeItem.html partial for the template | |
definition.link = angular.noop; // We aren't actually doing anything during the link, but we need to provide the member | |
return definition; // Return the definition | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment