Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meteor 0.8.0-rc0 - error #7

Closed
pwujek opened this issue Mar 23, 2014 · 6 comments
Closed

Meteor 0.8.0-rc0 - error #7

pwujek opened this issue Mar 23, 2014 · 6 comments

Comments

@pwujek
Copy link

pwujek commented Mar 23, 2014

Got this error while testing Meteor 0.8.0-rc0, I'd fix it if I understood what it is about.

While building packageaccounts-admin-ui-bootstrap-3: client/accounts_admin.html:21: 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 BLOCKOPEN is not allowed here. ...{#each users}} <tr {{#if myself _id}} c... ^

@hharnisc
Copy link
Owner

Seems like it could be a bug (or a new feature) with bleeding edge Meteor build.

The line with the error

<tr {{#if myself _id}} class="info" {{/if}}>

The template helper myself is being passed a variable _id (which is the user id of each user looped in the template)

myself: function(userId) {
    return Meteor.userId() === userId;
}

The intent is to distinguish the current user from any other user.

I've posted a link back to this bug to with the Meteor team to get some feedback from an issue that appears to be related.

meteor/meteor#1930

@dgreensp
Copy link

You have to move the #if after the class=.

@hharnisc
Copy link
Owner

I'm about to push a fix (thanks @dgreensp)

changed

<tr {{#if myself _id}} class="info" {{/if}}>

to

<tr class="{{#if myself _id}}info{{/if}}">

@baiqif
Copy link

baiqif commented Jun 24, 2014

How to deal with "checked"

@rafaelfaria
Copy link

+1 for the checked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants