Add role to user


#1

Hi,

I use this tutorial as a base to do an app: https://angular-meteor.com/tutorials/whatsapp2/meteor/setup

And i’m using this package for adding role: https://github.com/alanning/meteor-roles

Like this

<ion-tabs class="tabs-stable tabs-icon-top">
    <ion-tab [root]="tab4Root" tabTitle="{{ 'SETTINGS' | translate }}" tabIcon="settings"></ion-tab>
    {{#if isInRole 'admin'}}
        <ion-tab [root]="tab5Root" tabTitle="{{ 'MANAGE' | translate }}" tabIcon="construct"></ion-tab>
    {{/if}}
</ion-tabs>

And i have errors:
Error: Template parse errors: Parser Error: Unexpected token # at column 1 in [ {{#if isInRole ‘admin’}} ] in ng:///AppModule/TabsPage.html@0:418 (“ab> <ion-tab [root]=“tab4Root” tabTitle=”{{ ‘SETTINGS’ | translate }}" tabIcon=“settings”>[ERROR ->] {{#if isInRole ‘admin’}} <ion-tab [root]=“tab5Root” tabTitle="{{ ‘MANAGE’ | translate }}" tabIcon=“c”): ng:///AppModule/TabsPage.html@0:418 Parser Error: Unexpected token # at column 1 in [ {{#if isInRole ‘admin’}} ] in ng:///AppModule/TabsPage.html@0:418 (“itle=”{{ ‘SETTINGS’ | translate }}" tabIcon=“settings”> {{#if isInRole ‘admin’}} <ion-tab [ERROR ->][root]=“tab5Root” tabTitle="{{ ‘MANAGE’ | translate }}" tabIcon=“construct”> {{/if}} </ion-"): ng:///AppModule/TabsPage.html@0:453 Parser Error: Unexpected token # at column 1 in [ {{#if isInRole ‘admin’}} ] in ng:///AppModule/TabsPage.html@0:418 ("’ | translate }}" tabIcon=“settings”> {{#if isInRole ‘admin’}} <ion-tab [root]=“tab5Root” [ERROR ->]tabTitle="{{ ‘MANAGE’ | translate }}" tabIcon=“construct”> {{/if}} “): ng:///AppModule/TabsPage.html@0:471 Parser Error: Unexpected token # at column 1 in [ {{#if isInRole ‘admin’}} ] in ng:///AppModule/TabsPage.html@0:418 (“oot” tabTitle=”{{ ‘SETTINGS’ | translate }}" tabIcon=“settings”> {{#if isInRole ‘admin’}} [ERROR ->]<ion-tab [root]=“tab5Root” tabTitle="{{ ‘MANAGE’ | translate }}" tabIcon=“construct”> {{/if"): ng:///AppModule/TabsPage.html@0:444, Directive Tab Parser Error: Unexpected token # at column 1 in [ {{#if isInRole ‘admin’}} ] in ng:///AppModule/TabsPage.html@0:418 (“oot” tabTitle="{{ ‘SETTINGS’ | translate }}" tabIcon=“settings”> {{#if isInRole ‘admin’}} [ERROR ->]<ion-tab [root]=“tab5Root” tabTitle="{{ ‘MANAGE’ | translate }}" tabIcon=“construct”> {{/if"): ng:///AppModule/TabsPage.html@0:444, Directive Tab Parser Error: Unexpected token # at column 1 in [ {{#if isInRole ‘admin’}} ] in ng:///AppModule/TabsPage.html@0:418 (“n’}} <ion-tab [root]=“tab5Root” tabTitle=”{{ ‘MANAGE’ | translate }}" tabIcon=“construct”>[ERROR ->] {{/if}} “): ng:///AppModule/TabsPage.html@0:539 Parser Error: Unexpected token / at column 1 in [ {{/if}} ] in ng:///AppModule/TabsPage.html@0:539 (“n’}} <ion-tab [root]=“tab5Root” tabTitle=”{{ ‘MANAGE’ | translate }}” tabIcon=“construct”>[ERROR ->] {{/if}} "): ng:///AppModule/TabsPage.html@0:539

What is the best practice to add roles to users, based on this tutorial that use ionic, angular and meteor?

Thanks & Regards