I was creating a quick mock-up of a web app with some friends, and wanted to use a log in system. I have just read and completed the Discover Meteor, and decided I would just use their simple login, as I am using bootstrap as well. But after a quick search on Atmosphere I saw that there was now a accounts-ui-bootstrap-3, so I decided I would try it out, and use the bootstrap-3 package for some styling I had.
Once I installed it I threw my {{loginButtons}} in my navbar which looked as follows:
<ul class="nav navbar-nav navbar-right">
<li class="active"><a href="#">Dashboard</a></li>
<li>{{loginButtons}}</li>
<li><a href="#">Projects</a></li>
</ul>
Now when I completed my navbar it looked as I had planned, and I had a link for log in. But for some reason it was simply a link and no drop down would appear. Also there were no errors for the page in my developer console, nor when I clicked the button. So I tried moving some things but nothing worked, so since I was in a hurry I decided it may be easier just to use the previous dropdown I had used in the book. So I used this to remove the package:
mrt remove accounts-ui-bootstrap-3
mrt remove bootstrap-3
and added the following:
mrt add accounts-ui-bootstrap-dropdown
mrt add accounts-password
mrt add bootstrap
Once completed I went back to my page expecting to see a link, but now not only was there no drop down, there was no link to click. I checked my html, which was back to the format I showed earlier with the {{loginbuttons}} and I had just had the link with no drop down working in the accounts-ui-bootstrap-3 package. So I tried for a while to fix it but to no avail. I checked my console again and had absolutely no error.
Confused I now went back to the other package again by typing the following:
mrt remove accounts-ui-bootstrap-dropdown
mrt remove accounts-password
mrt remove bootstrap
mrt add accounts-ui-bootstrap-3
mrt add bootstrap-3
And when I got there, again no link would appear. But then it went further that even when I cycled backwards through various Git commits I had made, I can never get to a point in time in which it will now appear. No matter which stage of the project I enter, I cannot get the loginButtons to ever appear on my navbar. I only got an error at one point when both accounts-ui-bootstrap-dropdown and accounts-ui-bootstrap-3 were on my project at the same time, the error telling me I had two functions called logginbuttons at the same time (as expected). Once I removed one of the packages, it went away and again I had no error.
Now I could just fully restart my project, and try to quickly replicate my code to the new one, unfortunately I hadn't put the accounts option in till a bit late so I'll have to cycle over my last 2 days of work, but that not really a big deal, I just want to see if someone can let me know if I did something wrong, or maybe jut gain a further understanding of meteor and meteorite. Thanks! :)
EDIT I apologize I should have also filled in that I am changing bootstrap versions as well when I was switching back and forth. whenever I am using the bootstrap 3 login menu I switch to bootstrap 3 and remove 2. When I am using the bootstrap 2 menu, I install bootstrap 2 and remove bootstrap 3.
Change the line:
<li>{{loginButtons}}</li>
to:
<li>{{> loginButtons}}</li>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With