Skip to content

Conversation

@DexterMorg4n
Copy link
Contributor

scope.knob = scope.$eval(attrs.knobData);
to
var knob = scope.$eval(attrs.knobData);

If you name the data variable $scope.knob in the main scope than the directive will overwrite it and $watch will not function.
An internal variable is better

scope.knob = scope.$eval(attrs.knobData); 
to
var knob = scope.$eval(attrs.knobData);

If you name the data variable $scope.knob in the main scope than the directive will overwrite it and $watch will not function. 
An internal variable is better
@yunlzheng yunlzheng merged commit 76a1de5 into yunlzheng:master Oct 14, 2014
@yunlzheng
Copy link
Owner

Thanks for your suggestion, already merge your change.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants