示例#1
0
文件: views.go 项目: kego/ke
func New(ctx context.Context, self flux.ViewInterface) *View {
	app := stores.FromContext(ctx)
	return &View{
		View: flux.NewView(ctx, self, app),
		App:  app,
	}
}
示例#2
0
文件: view_ext_test.go 项目: kego/ke
func NewTestView(ctx context.Context, app flux.AppInterface, watch bool) *TestView {
	v := &TestView{}
	v.View = flux.NewView(ctx, v, app)
	if watch {
		v.Watch("a", notif1{})
	}
	return v
}