-
-
Save cloke/3106024 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Assume you are using a bound array named links that is defined like [{link: 'some link', title: 'my nifty link', active: true}, ...] | |
//in JS file. I will assume you have an app called MyApp that was create with Em.Application.create() | |
MyApp.linksController = Em.ArrayProxy.create({ | |
content: [ { link: 'I am a link', title: 'I am a title', active: true } ] | |
}); | |
<!-- Navbar | |
================================================== --> | |
<div class="navbar navbar-fixed-top"> | |
<div class="navbar-inner"> | |
<div class="container"> | |
<button type="button"class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
</button> | |
<a class="brand" href="./index.html">Bootstrap</a> | |
<div class="nav-collapse collapse"> | |
<ul class="nav"> | |
{{#each MyApp.linksController.conntent}} | |
<li {{bindAttr class="active"}}> | |
<a {{bindAttr href="link"}}>{{title}}</a> | |
</li> | |
{{/each}} | |
</ul> | |
</div> | |
</div> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment