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

...use('key').as('tag') not working when multiple mappings #48

Closed
valentinkostadinov opened this issue Mar 14, 2012 · 2 comments
Closed

Comments

@valentinkostadinov
Copy link

var plates = require('plates')

var data = {
first : 'john',
last : 'smith'
}

var map = plates.Map();
map.where('name').is('first').use('first').as('value');
map.where('name').is('last').use('last').as('value');

var html = '';

console.log(plates.bind(html, data, map))

OUTPUT:

EXPECTED:

@pksunkara
Copy link
Contributor

{
  "first": "john",
  "last": "smith"
}
<input name="first" value=""></input>
<input name="last" value=""></input>
var map = Plates.Map();
map.where('name').is('first').use('first').as('value');
map.where('name').is('last').use('last').as('value');

console.log(Plates.bind(html, data, map));

Output

<input name="first" value="john"></input>
<input name="last" value="smith"></input>

So, It's working in master.

@valentinkostadinov
Copy link
Author

Thanks! Still not working on the latest npm version 0.4.5, but I'm just going to use master.

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