Skip to content

Instantly share code, notes, and snippets.

@miguelarian
Created March 15, 2017 16:38
Show Gist options
  • Save miguelarian/1dda5afc3ade454741fb8690c110256b to your computer and use it in GitHub Desktop.
Save miguelarian/1dda5afc3ade454741fb8690c110256b to your computer and use it in GitHub Desktop.
view
-- VIEW
view : Model -> Html Msg
view model =
div
[]
[ div
[]
[ input [ id "operator1", onInput Operator1Changed ] [ text (toString model.op1) ]
, input [ id "operator2", onInput Operator2Changed ] [ text (toString model.op2) ]
, button [ onClick Add ] [ text "Add" ]
, button [ onClick Sub ] [ text "Sub" ]
, button [ onClick Mult ] [ text "Mult" ]
, button [ onClick Div ] [ text "Div" ]
]
, div
[]
[ p [] [ text ("Result: " ++ toString model.result) ] ]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment