1. Trang chủ
  2. » Giáo Dục - Đào Tạo

elm slides kho tài liệu bách khoa

234 49 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 234
Dung lượng 1,11 MB

Nội dung

welcome to elm! please follow these instructions to get set up: https://github.com/rtfeldman/elm-workshop elm @rtfeldman Rendering a Page compiles to elm functions arguments no parentheses getString : String -> Task Http.Error String result if it succeeds Task.perform Task Cmd Task.perform Task Cmd translate failure into a Msg Task.perform Task Cmd translate failure into a Msg translate success into a Msg Task.perform (\err -> ShowError err) (\json -> SetJson json) (Http.getString "https://api.github.com?q=blah") Task Cmd translate failure into a Msg translate success into a Msg Task.perform ShowError SetJson (Http.getString "https://api.github.com?q=blah") Task Cmd translate failure into a Msg translate success into a Msg Http.getString "https://api.github.com?q=blah" |> Task.perform ShowError SetJson Task Cmd translate failure into a Msg translate success into a Msg cmd : Cmd Msg cmd = Http.getString "https://api.github.com?q=blah" |> Task.perform ShowError SetJson Task Cmd translate failure into a Msg translate success into a Msg success gives you a String Http.getString url success gives you a String Http.getString url success gives you a SearchResult Http.get searchResultDecoder url Exercise: resolve the TODOs in part7/Main.elm cmd : Cmd Msg cmd = Http.getString "https://api.github.com?q=blah" |> Task.perform ShowError SetJson success gives you a SearchResult Http.get searchResultDecoder url day wrap Helpful Resources Slack: elmlang.herokuapp.com Weekly News: elmweekly.nl Google Group: elm-discuss Sept 15, 2016 Keynote: Evan Czaplicki Location: St Louis, MO Tickets: $100 http://elm-conf.us .. .elm @rtfeldman Rendering a Page compiles to elm functions arguments no parentheses required expression expression JS:... ] ul class="highway" li li text text “danger” “zone” Exercise: resolve the TODOs in part1/Main .elm ul [ class "highway" ] [ li [] [ text "danger" ] , li [] [ text "zone" ] ]

Ngày đăng: 16/11/2019, 21:02

TỪ KHÓA LIÊN QUAN