meteor - how to write if is not equal in blaze -
i have in js file:
isadmin: function() { if (meteor.user().roles[0] == "admin") { return true; } else { return false; } },
in html want if admin ==false.how it?
this true condition : want false
{{#if isadmin}} ... {{/if}}
is posible this?
{{#if !isadmin}} ... {{/if}}
i guess looking is
{{#unless isadmin}} ... {{/unless}}
have here @ docs.
btw, if using alanning:roles package, includes handy little helper blaze.
{{#unless isinrole 'admin'}} ... {{/unless}}
hope helps.
Comments
Post a Comment