How can I get my Materialize Dropdown to show a changing number of options depending on a variable?

I am using MaterializeCSS with Meteor/Blaze.

I have a dropdown that should displays a list of number from 1 to n. Currently I receive a number and that should be the max number allowed to display on the dropdown. However I am unsure of the best method to do this.

Should I create an array that contains all of the numbers form 1 to n and then just use the {{#each}}{{/each}} method to list out each li element.

Currently I receive the number from a function in the Template.helpers section in my JavaScript file.