mirror of https://github.com/vapor/docs.git
update call view command
update call view command ```swift drop.view -> drop.view.make ```
This commit is contained in:
parent
0a6c4b874f
commit
052525fd0b
|
|
@ -16,7 +16,7 @@ Returning HTML, or any other non-rendered document, is simple. Just use the path
|
|||
|
||||
```swift
|
||||
drop.get("html") { request in
|
||||
return try drop.view("index.html")
|
||||
return try drop.view.make("index.html")
|
||||
}
|
||||
```
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ Templated documents like mustache or stencil templates can take a `Context`.
|
|||
|
||||
```swift
|
||||
drop.get("template") { request in
|
||||
return try drop.view("index.template", [
|
||||
return try drop.view.make("index.template", [
|
||||
"message": "Hello, world!"
|
||||
])
|
||||
}
|
||||
|
|
@ -53,4 +53,4 @@ View.renderers[".mustache"] = MustacheRenderer()
|
|||
These renderers can be added to your application through Providers.
|
||||
|
||||
- [Mustache](https://github.com/vapor/mustache-provider)
|
||||
- [Stencil](https://github.com/vapor/stencil-provider)
|
||||
- [Stencil](https://github.com/vapor/stencil-provider)
|
||||
|
|
|
|||
Loading…
Reference in New Issue