Reputation: 68
I was working on a web app prior to finding meteor and to have multiple pages I had things like this (I'm using bootstrap):
<a href="../signUp.html" class="btn btn-lg btn-default">signup</a>
In order to have a button for a user to sign up. I'm trying to convert this to a template in order to work with the meteor framework. I made a template that had all the code from my signUp.html file and changed that line of code to look like this:
<a href={{> signUp}} class="btn btn-lg btn-default">signup</a>
and this gave me the following error:
INCLUSION template tag is not allowed in an HTML attribute
I changed it again to be like this:
<a {{> signUp}} class="btn btn-lg btn-default">signup</a>
and I got this error:
Reactive HTML attributes must either have a constant
name or consist of a single {{helper}} providing a dictionary of names and
values. A template tag of type INCLUSION is not allowed here.
Any help would be appreciated.
Upvotes: 0
Views: 63
Reputation: 161
What you really need is a router. Check out iron router You can add it using
meteor add iron:router
Then, set up the routes for your signup page. (Assuming that you have named the template as "signUp" )
Router.route('/signup', function () {
this.render('signUp');
});
And finally use the link as :
<a href="/signup" class="btn btn-lg btn-default">signup</a>
Upvotes: 2