我正在尝试设置EmberJS。这是我第一次尝试这样做的网站,请原谅我的noobness。目前没有任何东西输出到屏幕,但身体的灰色背景颜色。我不确定在设置我的EmberJS页面时出了什么问题。 以下是代码,如果您需要查看代码,可以在此处查看http://andrewhnovak.com/newSite/index.html HTML
<!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 type="text/javascript" src="js/jquery-1.10.1.min.js"></script>
<!--<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>
CSS
var App = Ember.Application.create();
App.Router.map(function() {
// put your routes here
});
App.IndexRoute = Ember.Route.extend({
model: function() {
return ['red', 'yellow', 'blue'];
}
});
答案 0 :(得分:0)
从检查JavaScript控制台看起来你缺少jQuery。