Skip to content

Commit

Permalink
modified: dist/angularjs-gravatardirective.js
Browse files Browse the repository at this point in the history
	modified:   src/angularjs-gravatardirective/directives/gravatar-directive.js
  • Loading branch information
goodseller committed Dec 7, 2014
1 parent 445755d commit 0a4fd32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions dist/angularjs-gravatardirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ angular.module('angularjs-gravatardirective.directives')
return {
restrict: "EAC",
link: function (scope, elm, attrs) {
// by default the values will come in as undefined so we need to setup a
// watch to notify us when the value changes
function ctrl(value, mode) {
// check inputs
if ((value === null) || (value === undefined) || (value === '')) {
Expand Down Expand Up @@ -67,9 +65,10 @@ angular.module('angularjs-gravatardirective.directives')
elm.find('img').bind('error', function () {
elm.find('img').remove();
});

}

// by default the values will come in as undefined so we need to setup a
// watch to notify us when the value changes
scope.$watch(attrs.gravatarEmail, function (value) {
ctrl(value, 'email');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ angular.module('angularjs-gravatardirective.directives')
return {
restrict: "EAC",
link: function (scope, elm, attrs) {
// by default the values will come in as undefined so we need to setup a
// watch to notify us when the value changes
function ctrl(value, mode) {
// check inputs
if ((value === null) || (value === undefined) || (value === '')) {
Expand Down Expand Up @@ -37,9 +35,10 @@ angular.module('angularjs-gravatardirective.directives')
elm.find('img').bind('error', function () {
elm.find('img').remove();
});

}

// by default the values will come in as undefined so we need to setup a
// watch to notify us when the value changes
scope.$watch(attrs.gravatarEmail, function (value) {
ctrl(value, 'email');
});
Expand Down

0 comments on commit 0a4fd32

Please sign in to comment.