Created
March 15, 2017 16:38
-
-
Save miguelarian/1dda5afc3ade454741fb8690c110256b to your computer and use it in GitHub Desktop.
view
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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