Open pro100sanya opened 10 years ago
I am trying to pass example from wiki on clean data binding. Have this code:
var html = "<p data-bind='para'></p><input type='text' data-bind-value='name' data-bind-placeholder='placeholder'/>"; var data = { "name": "Frank", "placeholder": "Some dude", "para": "Some Paragraph" }; var output = Plates.bind(html, data);
And I have this in browser:
<body> <p data-bind="para">Some Paragraph</p> <input type="text" data-bind-value="name" data-bind-placeholder="placeholder">Frank <input type="text" data-bind-value="name" data-bind-placeholder="placeholder">Some dude </body>
I supposed that bound values should be just replaced. But have got something another.
I cannot get what I am doing wrong..
What is the output you are expecting?
I am trying to pass example from wiki on clean data binding. Have this code:
And I have this in browser:
I supposed that bound values should be just replaced. But have got something another.
I cannot get what I am doing wrong..