This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed issue where ng:bind would not reset value if expression returne…
…d undefined
- Loading branch information
Showing
3 changed files
with
45 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!DOCTYPE HTML> | ||
<html xmlns:ng="http://angularjs.org"> | ||
<head> | ||
<script type="text/javascript" src="../src/angular-bootstrap.js" ng:autobind></script> | ||
</script> | ||
</head> | ||
<body ng:init="$window.$root = this; data = [{foo: 'foo'},{bar: 'bar'}]"> | ||
<p>This is a demo of a potential bug in angular.</p> | ||
<p>Try the following:</p> | ||
<ol> | ||
<li> Type "foo" on the filter box. | ||
<li> Clear the contents of the filter box. | ||
<li> Type "bar" on the filter box. | ||
<li> Clear the contents of the filter box. | ||
</ol> | ||
<p>Why doesn't the data goes back to the original?</p> | ||
<hr> | ||
Input: <input type="text" name="filterName" id="filterInputField"/> | ||
<br/> | ||
<table ng:eval="filtered_data = data.$filter(filterName)" style="border: 1px solid black"> | ||
<tr> | ||
<th>Foo</th> | ||
<th>Bar</th> | ||
</tr> | ||
<tr ng:repeat="record in filtered_data"> | ||
<td>{{record.foo}}</td> | ||
<td>{{record.bar}}</td> | ||
</tr> | ||
</table> | ||
</body> | ||
</html> |
This file contains 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 file contains 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