/    Sign up×
Community /Pin to ProfileBookmark

Help setting up EmberJS

I’m trying to set up EmberJS. This is my first website attempting this so please excuse my noobness. Currently nothing is outputting to the screen but the body’s grey background color. I’m not sure where I went wrong in setting up my EmberJS page.
Here’s the code and if you need to see it in action you can view [url]http://andrewhnovak.com/newSite/index.html[/url]
HTML

[CODE]<!doctype html>
<html>
<head>
<meta charset=”utf-8″>
<title>Site Demo</title>
<link rel=”stylesheet” type=”text/css” href=”css/bootstrap.min.css”>
<link rel=”stylesheet” type=”text/css” href=”css/header.css”>
<link rel=”stylesheet” type=”text/css” href=”css/mainPage.css”>

</head>

<body>

<script type=’text/x-handlebars’ data-template-name=’application’>

<div class=”container”>
<div class=”header”>
<div class=’col-md-1′>
Logo
</div><!–end header container–>
<div class=’col-md-2 col-md-offset-1′>
<div class=’link1′>
<a href=”#”>Link1</a>
</div>
</div>
<div class=’col-md-3′>
<div class=’link2′>
<a href=”#”>Link2</a>
</div>
</div>
<div class=’col-md-2′>
<div class=’link3′>
<a href=”#”>Link3</a>
</div>
</div>
<div class=’col-md-2′>
<div class=’searchBar’>
<input type=”text” class=”form-control” placeholder=”Search Box”>
</div>
</div>
<div class=’col-md-1′>
<div class=’searchButton’>
<button class=”btn btn-search” type=”submit”>Search</button>
</div>
</div>

</div>

</div>

<div class=”container”>
<div class=’underHeader’>

</div>
</div>

<div class=”container”>
<div class=’whiteBox’>
<div class=’newProducts’>
</div>
{{outlet}}
</div>
</div>
</script>
<script type=’text/x-handlebars’ data-template-name=’index’>
<h1>Testing the page</h1>
</script>
</body>

<script src=”js/jquery.easing-1.3.js”></script>
<script src=”js/bootstrap.js”></script>
<script src=”js/menu.js”></script>
<script type=”text/javascript” src=”js/libs/handlebars-v2.0.0.js”></script>
<script type=”text/javascript” src=”js/libs/ember-1.9.1.js”></script>
<script type=”text/javascript” src=”js/app.js”></script>
</html>
[/CODE]

App.js

[CODE]var App = Ember.Application.create();

App.Router.map(function() {
// put your routes here
});

App.IndexRoute = Ember.Route.extend({
model: function() {
return [‘red’, ‘yellow’, ‘blue’];
}
});
[/CODE]

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @andynov123 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...