Skip to content

Commit c4c60c2

Browse files
committed
reafactor: Rename ng:bind-immediate -> ng:model-instant
1 parent 139e1b0 commit c4c60c2

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

docs/src/templates/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101

102102
<div id="sidebar">
103103
<input type="text" ng:model="search" id="search-box" placeholder="search the docs"
104-
tabindex="1" accesskey="s" ng:bind-immediate>
104+
tabindex="1" accesskey="s" ng:model-instant>
105105

106106
<ul id="content-list" ng:class="sectionId" ng:cloak>
107107
<li ng:repeat="page in pages | filter:search" ng:class="getClass(page)">

src/AngularPublic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function publishExternalAPI(angular){
103103
ngModel: ngModelDirective,
104104
ngList: ngListDirective,
105105
ngChange: ngChangeDirective,
106-
ngBindImmediate: ngBindImmediateDirective,
106+
ngModelInstant: ngModelInstantDirective,
107107
required: requiredDirective,
108108
ngRequired: requiredDirective
109109
}).

src/widget/input.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,22 +1004,22 @@ var ngChangeDirective = valueFn({
10041004

10051005
/**
10061006
* @ngdoc directive
1007-
* @name angular.module.ng.$compileProvider.directive.ng:bind-immediate
1007+
* @name angular.module.ng.$compileProvider.directive.ng:model-instant
10081008
*
10091009
* @element input
10101010
*
10111011
* @description
10121012
* By default, Angular udpates the model only on `blur` event - when the input looses focus.
1013-
* If you want to update after every key stroke, use `ng:bind-immediate`.
1013+
* If you want to update after every key stroke, use `ng:model-instant`.
10141014
*
10151015
* @example
10161016
* <doc:example>
10171017
* <doc:source>
10181018
* First name: <input type="text" ng:model="firstName" /><br />
1019-
* Last name: <input type="text" ng:model="lastName" ng:bind-immediate /><br />
1019+
* Last name: <input type="text" ng:model="lastName" ng:model-instant /><br />
10201020
*
10211021
* First name ({{firstName}}) is only updated on `blur` event, but the last name ({{lastName}})
1022-
* is updated immediately, because of using `ng:bind-immediate`.
1022+
* is updated immediately, because of using `ng:model-instant`.
10231023
* </doc:source>
10241024
* <doc:scenario>
10251025
* it('should update first name on blur', function() {
@@ -1034,7 +1034,7 @@ var ngChangeDirective = valueFn({
10341034
* </doc:scenario>
10351035
* </doc:example>
10361036
*/
1037-
var ngBindImmediateDirective = ['$browser', function($browser) {
1037+
var ngModelInstantDirective = ['$browser', function($browser) {
10381038
return {
10391039
require: 'ngModel',
10401040
link: function(scope, element, attr, ctrl) {

test/widget/inputSpec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -923,10 +923,10 @@ describe('input', function() {
923923
});
924924

925925

926-
describe('ng:bind-change', function() {
926+
describe('ng:model-instant', function() {
927927

928928
it('should bind keydown, change, input events', inject(function($browser) {
929-
compileInput('<input type="text" ng:model="value" ng:bind-immediate />');
929+
compileInput('<input type="text" ng:model="value" ng:model-instant />');
930930

931931
inputElm.val('value1');
932932
browserTrigger(inputElm, 'keydown');

0 commit comments

Comments
 (0)