Files
elm-0.19-workshop/part10/Pages/Repository.elm
Richard Feldman 18b8723f16 SPA for part10
2016-09-01 06:39:06 -07:00

38 lines
617 B
Elm

module Pages.Repository exposing (..)
import Html exposing (..)
import Html.Attributes exposing (class, target, href, property, defaultValue)
import ElmHub exposing (SearchResult)
type alias Model =
SearchResult
init : Int -> ( Model, Cmd Msg )
init id =
( { id = id
, name = ""
, stars = id
}
, Cmd.none
)
view : Model -> Html Msg
view model =
div []
[ div [] [ text ("repo" ++ toString model.stars) ]
]
type Msg
= NoOp
update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
case msg of
NoOp ->
( model, Cmd.none )