default.txt 377 B

123456789101112131415
  1. import Html exposing (div, button, text)
  2. import Html.App exposing (beginnerProgram)
  3. import Html.Events exposing (onClick)
  4. type Msg
  5. = Increment
  6. main =
  7. beginnerProgram
  8. { model = 0, view = view
  9. , update = \Increment model -> model + 1 }
  10. view model =
  11. div [] [ div [] [ text (toString model) ]
  12. , button [ onClick Increment ] [ text "+" ] ]