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

Commit cd06ccc

Browse files
committed
docs(ngSelected): note that it doesn't interact with ngModel
Closes #14916 Related #14876
1 parent aea62af commit cd06ccc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/ng/directive/attrs.js

+7
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,13 @@
271271
* A special directive is necessary because we cannot use interpolation inside the `selected`
272272
* attribute. See the {@link guide/interpolation interpolation guide} for more info.
273273
*
274+
* <div class="alert alert-warning">
275+
* **Note:** `ngSelected` does not interact with the `select` and `ngModel` directives, it only
276+
* sets the `selected` attribute on the element. If you are using `ngModel` on the select, you
277+
* should not use `ngSelected` on the options, as `ngModel` will set the select value and
278+
* selected options.
279+
* </div>
280+
*
274281
* @example
275282
<example>
276283
<file name="index.html">

0 commit comments

Comments
 (0)