Skip to content

Instantly share code, notes, and snippets.

@JemiloII
Created July 24, 2014 19:48
Show Gist options
  • Save JemiloII/70e62ff388218896c131 to your computer and use it in GitHub Desktop.
Save JemiloII/70e62ff388218896c131 to your computer and use it in GitHub Desktop.
For locks~
<!DOCTYPE html>
<html>
<head>
<title>Testing Ember</title>
<style>.active{font-weight: bold; text-decoration: none;}</style>
</head>
<body>
<script type="text/x-handlebars">
<nav>
{{#link-to 'index'}}Home{{/link-to}} |
{{#link-to 'members'}}Members{{/link-to}} |
{{#link-to 'about'}}About{{/link-to}}
</nav>
<h1>Hello World!</h1>
{{outlet}}
</script>
<script type="text/x-handlebars" id="index">
<h2>Home</h2>
</script>
<script type="text/x-handlebars" id="members/index">
<h2>Members</h2>
<nav>{{#link-to 'members.new'}}New{{/link-to}}</nav>
{{#each}}
<p>Member: {{username}} Type: {{type}}</p>
{{/each}}
</script>
<script type="text/x-handlebars" id="members/new">
<h2>New Member</h2>
<p>{{model.username}} {{model.type}}</p>
{{input
name="username"
placeholder="Enter Username..."
valueBinding="model.username"
}}
{{view Ember.Select
content=types
value=selectedType
selectionBinding="model.type"
prompt="Account type"
}}
<button {{action create target="controller"}} >Submit</button>
</script>
<script type="text/x-handlebars" id="about">
<h2>About</h2>
</script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://localhost/snarky/js/config/sails.io.js"></script>
<script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.3.0.js"></script>
<script src="http://builds.emberjs.com/tags/v1.6.0/ember.js"></script>
<script src="http://localhost/snarky/js/config/ember-data.js"></script>
<script src="js/app.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment