From 71daa113576d05adcbf5f8ed623a2850e805f878 Mon Sep 17 00:00:00 2001 From: javatutorials2016 Date: Tue, 26 Mar 2019 12:01:32 -0400 Subject: [PATCH] docs: add note about ngModel usage in structural directives guide (#29522) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When I tried one of the examples provided in the documention, encountered the " Can't bind to 'ngModel' since it isn't a known property of 'select' ” error. So to resolve it I imported the FormsModule in ngModule. If it is mentioned in the documentation, it would be handy for the beginners to try and learn. Thanks for considering. Duplicate of pull Request# 29206, As I encountered few issues after multiple authors corrected, So I am creating the new pull request PR Close #29522 --- aio/content/guide/structural-directives.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aio/content/guide/structural-directives.md b/aio/content/guide/structural-directives.md index 1f4e31ab23..77ee244e19 100644 --- a/aio/content/guide/structural-directives.md +++ b/aio/content/guide/structural-directives.md @@ -590,6 +590,11 @@ The drop down works properly. ngcontainer options work properly +
+ +**Note:** Remember that ngModel directive is defined as a part of Angular FormsModule and you need to include FormsModule in the imports: [...] section of the Angular module metadata, in which you want to use it. + +
The `` is a syntax element recognized by the Angular parser.