Advertisement
Guest User

Untitled

a guest
Jul 14th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. <template name="parent">
  2. {{> linkTemplate linkData}}
  3. {{#each links}}
  4. {{> linkTemplate}}
  5. {{/each}}
  6. </template>
  7.  
  8. <template name="linkTemplate">
  9. <a href="{{url}}">{{title}}</a>
  10. </template>
  11.  
  12. Links=new Meteor.Collection(null);
  13. Links.insert({
  14. url:"https://www.google.com",
  15. title:"Google"
  16. });
  17.  
  18. Template.parent.helpers({
  19. linkData:function(){
  20. return {
  21. url:"https://www.google.com",
  22. title:"Google"
  23. };
  24. },
  25. links:function(){
  26. return Links.find();
  27. }
  28. });
  29.  
  30. var string="A link to <a href="https://www.google.com">Google</a>.";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement