mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-08 23:04:45 +00:00
parent
fb99b539b4
commit
b5bba65a93
1 changed files with 5 additions and 2 deletions
|
|
@ -611,8 +611,11 @@ then uses the information it obtains to compose hashbang URLs (such as
|
||||||
## Two-way binding to $location
|
## Two-way binding to $location
|
||||||
|
|
||||||
The Angular's compiler currently does not support two-way binding for methods (see {@link
|
The Angular's compiler currently does not support two-way binding for methods (see {@link
|
||||||
https://github.com/angular/angular.js/issues/404 issue}). If you should require two-way binding,
|
https://github.com/angular/angular.js/issues/404 issue}). If you should require two-way binding
|
||||||
you will need to specify an extra property that has two watchers. For example:
|
to the $location object (using {@link api/angular.module.ng.$compileProvider.directive.input.text
|
||||||
|
ngModel} directive on an input field), you will need to specify an extra model property
|
||||||
|
(e.g. `locationPath`) with two watchers which push $location updates in both directions. For
|
||||||
|
example:
|
||||||
<pre>
|
<pre>
|
||||||
<!-- html -->
|
<!-- html -->
|
||||||
<input type="text" ng-model="locationPath" />
|
<input type="text" ng-model="locationPath" />
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue