Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <template name="parent">
- {{> linkTemplate linkData}}
- {{#each links}}
- {{> linkTemplate}}
- {{/each}}
- </template>
- <template name="linkTemplate">
- <a href="{{url}}">{{title}}</a>
- </template>
- Links=new Meteor.Collection(null);
- Links.insert({
- url:"https://www.google.com",
- title:"Google"
- });
- Template.parent.helpers({
- linkData:function(){
- return {
- url:"https://www.google.com",
- title:"Google"
- };
- },
- links:function(){
- return Links.find();
- }
- });
- var string="A link to <a href="https://www.google.com">Google</a>.";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement