在MVCTodo的更新版本中替换Html.app

时间:2018-05-21 19:18:16

标签: elm

我想更新elm-package.json中的MVC Todo替换elm-package.json中的新{ "version": "2.0.0", "summary": "TodoMVC created with Elm and elm-html", "repository": "https://github.com/somenxavier/minuscule.git", "license": "BSD3", "source-directories": [ "." ], "exposed-modules": [], "dependencies": { "elm-lang/core": "5.1.1 <= v < 6.0.0", "elm-lang/html": "2.0.0 <= v < 3.0.0", "elm-lang/dom": "1.1.1 <= v < 2.0.0", "elm-lang/virtual-dom": "2.0.4 <= v < 2.1.0", "elm-lang/navigation": "2.1.0 <= v < 2.2.0", "elm-community/string-extra": "1.4.0 <= v < 1.5.0" }, "elm-version": "0.18.0 <= v < 0.19.0" } 。我的新elm-reactor是:

I cannot find module 'Html.App'. Module 'Todo' is trying to import it.

html.app抱怨我

Html.App.map (\msg -> UpdateTask ( id, msg )) taskView

我知道 <plist version="1.0"> <key>colors</key> <dict> <key>color</key> <string>f9982f</string> </dict> <key>more_colors</key> <dict> <key>othercolor</key> <string>$color</string> </dict> <key>colorString</key> <string>$color</string> </plist> old version,但是如何在代码中替换它的引用?具体来说,如何替换这个

FirstOrDefault

1 个答案:

答案 0 :(得分:3)

请参阅Html.map。具体做法是:

  

elm-lang/html已将Html.App折叠为Html。因此,您需要删除所有导入Html.App导入,并改为引用Html.program

Html.App.map现在是http://localhost:8888/mvc/user/login