由买买提看人间百态

topics

全部话题 - 话题: mystyle
(共0页)
a*f
发帖数: 1790
1
来自主题: Programming版 - FP才是真正的主流,比如Excel
Haskell可以写FP,但是不等于Haskell代码都是FP
下面这段代码定义Web form的一个field,都是描述性的定义,看不出和FP有啥关系,
按这种方式写Web有啥好处?
import Html exposing (Html, Attribute, text, toElement, div, input)
import Html.Attributes exposing (..)
import Html.Events exposing (on, targetValue)
import Signal exposing (Address)
import StartApp.Simple as StartApp
main =
StartApp.start { model = "", view = view, update = update }
update newStr oldStr =
newStr
view : Address String -> String -> Html
view address string =
div []
[ input
... 阅读全帖
l**********n
发帖数: 8443
2
来自主题: Programming版 - web set test color方法都这么多了
ng-style="myStyle"
and your scope has a property myStyle
scope.myStyle = {color: 'red' }
(共0页)