From 7ede6dfbd2ddc7c7bcd8b3d6a55952bd8ae2136d Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Tue, 30 Oct 2018 15:41:28 -0500 Subject: [PATCH] Add missing `await` to example code (#9338) Fixes #9336 --- aspnetcore/mvc/views/view-components.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/mvc/views/view-components.md b/aspnetcore/mvc/views/view-components.md index 5b7993d457..174f711e3e 100644 --- a/aspnetcore/mvc/views/view-components.md +++ b/aspnetcore/mvc/views/view-components.md @@ -82,7 +82,7 @@ We recommend you name the view file *Default.cshtml* and use the *Views/Shared/C To use the view component, call the following inside a view: ```cshtml -@Component.InvokeAsync("Name of view component", {Anonymous Type Containing Parameters}) +@await Component.InvokeAsync("Name of view component", {Anonymous Type Containing Parameters}) ``` The parameters will be passed to the `InvokeAsync` method. The `PriorityList` view component developed in the article is invoked from the *Views/Todo/Index.cshtml* view file. In the following, the `InvokeAsync` method is called with two parameters: