0
我正在写一个小程序来处理和显示吉他和弦。如何将Int转换为Html
但是我被卡住了:我不知道如何将的Int值转换成Html。
我的小渲染功能样子:
renderGuitarString : GuitarString -> Html Msg
renderGuitarString guitarString =
div [ class "string" ] --here I don't know what to do
和:
view : Model -> Html Msg
view model =
div [] (List.map renderGuitarString model.guitarStrings)
只为完整的图片,我类型我模型:
type alias GuitarString =
{ number : Int
, frets : List Fret
}
和:
type alias Fret =
{ number : Int
, tone : (String, Int)
}
和:
type alias Model =
{ guitarStrings : List GuitarString
}
我想将钢丝数值转化为真正的HTML。
感谢您的帮助!
还好,基本...:d – Timo