Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 861e0c7

Browse files
basaratpetebacondarwin
authored andcommitted
docs(input): ng-model doesn't work well with isolated scope directive
Closes #3123
1 parent 0e9e0af commit 861e0c7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ng/directive/input.js

+4
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,10 @@ var VALID_CLASS = 'ng-valid',
843843
* specifically does not contain any logic which deals with DOM rendering or listening to
844844
* DOM events. The `NgModelController` is meant to be extended by other directives where, the
845845
* directive provides DOM manipulation and the `NgModelController` provides the data-binding.
846+
* Note that you cannot use `NgModelController` in a directive with an isolated scope,
847+
* as, in that case, the `ng-model` value gets put into the isolated scope and does not get
848+
* propogated to the parent scope.
849+
*
846850
*
847851
* This example shows how to use `NgModelController` with a custom control to achieve
848852
* data-binding. Notice how different directives (`contenteditable`, `ng-model`, and `required`)

0 commit comments

Comments
 (0)