0

In each loop data is not displaying.value="{{param_type}}" not displaying.Please help me.

{{ #each api_method_param_data }}
    <select id="param_type"> 
    {{#each dropdown}}
    {{#if isSelected this param_type}}  
    <option value="{{param_type}}" selected="selected"> {{this}} </option>
    {{else}}
    <option value="{{param_type}}" > {{this}} </option>
    {{/if}}
    {{/each}}
    </select>
 {{/each}}

This is the helper function

 Template.apimethodchange.isSelected = function(fooToCheck, recordFoo)
  {
    var checkrec = "";  
    for(var i=0;i<recordFoo.length;i++)
    {
        checkrec = checkrec + recordFoo[i];
    }
    console.log(checkrec + fooToCheck);
    return (fooToCheck == checkrec);
  };

Template.apimethodchange.dropdown = ["string","array","int","boolean","double","struct"];
2
  • Can you tell us what the data context or helper function looks like? Commented Nov 7, 2014 at 6:55
  • I am added the helper function Please check once.@richsilv Commented Nov 7, 2014 at 7:40

1 Answer 1

1

Try with ../ to access parent context

<option value="{{../param_type}}" selected="selected"> {{this}} </option>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.