Skip to content

Commit 9a81bc9

Browse files
authored
fix: Added missing opening tag (#775)
1 parent 482d690 commit 9a81bc9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/site/docs/providing-input/substituting-components.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ ctx.ComponentFactories.AddStub<Bar>("<div>NOT FROM BAR</div>");
7676

7777
// Add the markup specified in the render fragment to the rendered
7878
// output instead of that from <Bar>.
79-
ctx.ComponentFactories.AddStub<Bar>(@div>NOT FROM BAR</div>);
79+
ctx.ComponentFactories.AddStub<Bar>(@<div>NOT FROM BAR</div>);
8080
```
8181

8282
It is also possible to access the parameter that is passed to the substituted component, both when specifying alternative render output or when verifying the correct parameters was passed to the substituted component. For example, suppose `<Foo>` has a parameter named `Baz`:
@@ -88,7 +88,7 @@ ctx.ComponentFactories.AddStub<Bar>(parameters => $"<div>{parameters.Get(x => Ba
8888

8989
// Add the markup produced by the render template to the rendered
9090
// output instead of that from <Bar>.
91-
ctx.ComponentFactories.AddStub<Bar>(parameters => @div>@(parameters.Get(x => Baz))</div>);
91+
ctx.ComponentFactories.AddStub<Bar>(parameters => @<div>@(parameters.Get(x => Baz))</div>);
9292
```
9393

9494
To verify that the expected value was passed to the `Baz` parameter of `<Foo>`, first find the substituted component in the render tree using the `FindComponent`/`FindComponents` methods, and then inspect the `Parameters` property. E.g.:
@@ -136,7 +136,7 @@ ctx.ComponentFactories.AddStub(type => type.Namespace == "Third.Party.Lib",
136136
// Add the markup produced by the render fragment to the rendered
137137
// output instead of the components that match the predicate.
138138
ctx.ComponentFactories.AddStub(type => type.Namespace == "Third.Party.Lib",
139-
@div>NOT FROM BAR</div>);
139+
@<div>NOT FROM BAR</div>);
140140
```
141141

142142
### Creating a mock component with mocking libraries

0 commit comments

Comments
 (0)