t03helloparam

package
v0.0.0-...-f865034 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package t03helloparam shows how to create a custom hello world component, instead of just using a function as shown in package t01helloworld. To do so, just aggregate a view.View into your custom struct and implement a 'func Render() view.Node' method, so that your new component actually conforms to the view.Component interface. Note also the usage of the query parameter 'name' to say hello.

Index

Constants

View Source
const Path = "/tutorial/03-helloparam?name=world"

Variables

This section is empty.

Functions

func FromQuery

func FromQuery(q router.Query) gt.Renderable

Types

type ContentView

type ContentView struct {
	gt.View
	// contains filtered or unexported fields
}

func NewContentView

func NewContentView(msg string) *ContentView

func (*ContentView) Render

func (c *ContentView) Render() gt.Node

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL