Closed benkoshy closed 4 years ago
I managed to get it working by manually modifying the index.html file generated by elm make...
command.
I added flags with the value null:
var app = Elm.Main.init({ node: document.getElementById("elm"), flags: null});
The object that is passed to flags
is going to be the input argument for the init
function. Since the init
function expects a Maybe Model
, you can pass in a JSON object representing an entire model:
{ entries: [{description:"Hello!", completed:true, editing:false, id:13}], visibility: "All", field: "", uid: 0}
I added an html link reference in the header to the included style.css file:
<link rel="stylesheet" type="text/css" href="style.css">
How to reproduce
It works fine if you click on
index.html
but if you want to make see the elm debugger in action, then it is a little problematic:Clone the repo.
Run
elm reactor
Click on
Main.elm
.The following error comes up: