Hi Hunt Graham,

1. With output return, we don't need template for view

hello('GET', []) ->
>   {output, "<html><head></head><body><div>Hello 
> world!</div></body></html>"}.


It already returns template.

2. With defined function above, GET request to 
localhost:8001/greeting/hello maps with that unique action "hello" of 
controller "greeting". In tutorial, Evan just shows 3 returned options: 
output, json, ok that CB provides. If you want to test with ok, you should 
add new action:

salut('GET', []) ->
>   {ok, [{greeting, "Hello, world!"}]}.


In this case you should create template view/greeting/salut.dtl (or 
salut.html) with content

<h1>Hello!</h1>
> {{ greeting }}


Now you can open localhost:8001/greeting/salut
Regards,
Cuong Th.

-- 
You received this message because you are subscribed to the Google Groups 
"ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/chicagoboss/0c6b30fd-6a44-4938-a208-3ece164c47a4%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to