Hi,
On Monday, April 24, 2017 at 10:54:28 PM UTC+5:30, Erik Lott wrote:
>
> Whoops. Html.map is correct... 
>

 Thanks for the answers.  However I later ``discovered`` that  the top Msg 
will have to include a id too , 
     type Msg    = ItemMsg IDType ItemMsg
 .. so things got  more complicated. 
I guess i'll make flat app first, and them extract models.

-Thanks
Vardhan



> view : Model -> Html Msg
> view model =
>     div []
>         (model.items
>               |> List.map itemView 
>               |> List.map (Html.map ItemMsg)
>         )
>
> On Sunday, April 23, 2017 at 1:49:22 PM UTC-4, Max Goldstein wrote:
>>
>> Yes, Ian is correct.
>>
>> Html.Attributes.map 
>> <http://package.elm-lang.org/packages/elm-lang/html/2.0.0/Html-Attributes#map>
>>  : 
>> (a -> msg) -> Attribute a -> Attribute msg
>>
>> Html.map  
>> <http://package.elm-lang.org/packages/elm-lang/html/2.0.0/Html#map>: (a 
>> -> msg) -> Html a -> Html msg
>>
>
On Monday, April 24, 2017 at 10:54:28 PM UTC+5:30, Erik Lott wrote:
>
> Whoops. Html.map is correct... 
>
> view : Model -> Html Msg
> view model =
>     div []
>         (model.items
>               |> List.map itemView 
>               |> List.map (Html.map ItemMsg)
>         )
>
> On Sunday, April 23, 2017 at 1:49:22 PM UTC-4, Max Goldstein wrote:
>>
>> Yes, Ian is correct.
>>
>> Html.Attributes.map 
>> <http://package.elm-lang.org/packages/elm-lang/html/2.0.0/Html-Attributes#map>
>>  : 
>> (a -> msg) -> Attribute a -> Attribute msg
>>
>> Html.map  
>> <http://package.elm-lang.org/packages/elm-lang/html/2.0.0/Html#map>: (a 
>> -> msg) -> Html a -> Html msg
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to