Athiwat Chunlakhan
Athiwat Chunlakhan

Reputation: 7799

How do I remove a template that I inserted in meteor?

The problem that I'm having is that I'm inserting the login bar and the registration bar using two templates call "login" and "register". What I would like to do is when a user log in. The register template should be removed. I'm not able to find a good solution to remove a template programmatically.

Upvotes: 0

Views: 518

Answers (1)

crapthings
crapthings

Reputation: 2485

handlebars has helper like {{currentUser}}

{{#unless currentUser}}
    show signin / signup view
{{/unless}}

{{#if currentUser}}
    show if user is loggedin
{{/if}}

Upvotes: 2

Related Questions