Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/ng/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,12 +418,20 @@ function $CompileProvider($provide) {


/**
* @ngdoc function
* @name ng.$compile.directive.Attributes#$observe
* @methodOf ng.$compile.directive.Attributes
* @function
*
* @description
* Observe an interpolated attribute.
* The observer will never be called, if given attribute is not interpolated.
* The interpolated value of the attribute is passed to the observer function.
*
* @param {string} key Normalized key. (ie ngAttribute) .
* @param {function(*)} fn Function that will be called whenever the attribute value changes.
* @returns {function(*)} the `fn` Function passed in.
* @param {function(attrValue)} fn Function that will be called whenever the attribute value changes.
* See the {@link guide/directive#Attributes Directive guide} for more info.
* @returns {function()} the `fn` Function passed in.
*/
$observe: function(key, fn) {
var attrs = this,
Expand Down