I have set up iron routes in my router to render a specific template using the following code:
var Home = RouteController.extend({
....
action: function () {
if (this.ready()) {
this.render('main', {state: 'normal'});
}
else {
;//this.render('loading');
}
}
});
In my implementation, I am trying to pass a state
variable to the template and utilize it within the class attribute like so:
<template name="main">
<section class="{{state}}">
....
</section>
</template>
Unfortunately, the state variable appears to be undefined
, indicating that my current approach is not functioning correctly. Can anyone provide suggestions on how I can effectively pass data to the template?