Clarified some language in the 'Controlling Tag Helper scope with the *_ViewImports.cshtml* file' section. (#3712)

pull/3715/head
Daniel Vicarel 2017-07-13 17:25:43 -04:00 committed by Rick Anderson
parent 94d64fbb62
commit 798520e785
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ The `@removeTagHelper` has the same two parameters as `@addTagHelper`, and it re
### Controlling Tag Helper scope with the *_ViewImports.cshtml* file
You can add a *_ViewImports.cshtml* to any view folder, and the view engine adds the directives from that *_ViewImports.cshtml* file to those contained in the *Views/_ViewImports.cshtml* file. If you added an empty *Views/Home/_ViewImports.cshtml* file for the *Home* views, there would be no change because the *_ViewImports.cshtml* file is additive. Any `@addTagHelper` directives you add to the *Views/Home/_ViewImports.cshtml* file (that are not in the default *Views/_ViewImports.cshtml* file) would expose those Tag Helpers to views only in the *Home* folder.
You can add a *_ViewImports.cshtml* to any view folder, and the view engine applies the directives from both that file and the *Views/_ViewImports.cshtml* file. If you added an empty *Views/Home/_ViewImports.cshtml* file for the *Home* views, there would be no change because the *_ViewImports.cshtml* file is additive. Any `@addTagHelper` directives you add to the *Views/Home/_ViewImports.cshtml* file (that are not in the default *Views/_ViewImports.cshtml* file) would expose those Tag Helpers to views only in the *Home* folder.
### Opting out of individual elements