Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binding doesn't work as expected #113

Open
pro100sanya opened this issue Oct 24, 2013 · 1 comment
Open

Binding doesn't work as expected #113

pro100sanya opened this issue Oct 24, 2013 · 1 comment

Comments

@pro100sanya
Copy link

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..

@davidamitchell
Copy link

What is the output you are expecting?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants