I'm trying to have a rating form inside a Meteoric IonPopup. I have a button to show the form:
Template.thing.events({
'click [data-action="showReview"]': function(event, template) {
IonPopup.show({
title: 'Leave a review',
cssClass : '',
templateURL: 'reviewPopup.html',
buttons: [{
text: 'Cancel',
type: 'button-default',
onTap: function(e) {
e.preventDefault();
}
}, {
text: 'OK',
type: 'button-positive',
onTap: function(e) {
return scope.data.response;
}
}]
});
}
});
which ideally should put reviewPopup.html in the body
reviewPopup.html
<template name="reviewPopup">
{{#if currentUser}}
Rating: {{> rating}}
{{/if}}
</template>
<template name="rating">
<div class="rateit"></div>
</template>
However I can't seem to get the templateURL option to work. Both templates are in the same directory. Am I correct in thinking that I give it a file name and it just inserts the content of that file into the body? The docs for IonPopup.show say:
templateUrl: '', // String (optional). The URL of an html template to place in the popup body.
It looks like you are referring to the ionic docs - meteoric follows ionic conventions, but not so closely that you can assume the implementations are the same. The best way to use meteoric is by studying the example meteoric apps and looking through their code.
In this case, the relevant code from the meteoric repo looks like this:
..so it looks like you want to use
templateName:and your template's name, instead of ionic'stemplateURL. Hope that helps!!