mardi 25 avril 2017

Meteor Angular Using ng-if in main.html

I'm trying to switch templates within main.html My main.html currently looks likes

<head>
  <title>Game</title>
</head>
<body>
    <h4 class="bigcenter">GAME LOBBY</h4>
    <login-buttons></login-buttons>
    <div ng-if="something" class="container">
        <lobby></lobby>
    </div>
</body>

I would like the lobby template to only load when a certain variable is a certain value. I would like to be able to change the value of this variable in lobby.js as well so you can exit from that "view" per se.

However, being the Meteor noob that I am, I do not know where to declare this variable and if I would be able to mutate it across all the files in the app. If you could share your thoughts or advice, it would be greatly appreciated. Thanks!




Aucun commentaire:

Enregistrer un commentaire