私は Web アプリケーション フレームワークの概念全体に非常に慣れていないので、昨夜 ember.js から始めました。開始に関するビデオチュートリアルに従いましたが、この問題があります。
Ember.js は、非常に奇妙なファイルにアクセスするために GET リクエストを作成しようとしています。これが私のファイルとエラーです。コードは、ember がリクエストを作成して禁止された 403 エラーを取得することを除いて完全に機能します (Apache が不適切な文字を使用してブロックするため)。
<!-- An extract of my index.html -->
<script type="text/x-handlebars" id="shots">
{{#each}}
<h4>{{title}}</h4>
<h6>Shot ID: {{id}}</h6>
<hr />
<p>Published on the {{pubDate}} by {{author.name}}</p>
<img src="{{image}}" alt="{{description}}" />
<p>{{description}}</p>
{{/each}}
</script>
そして、これは私の JavaScript です:
// core.js
Master = Ember.Application.create();
Master.Router.map(function() {
this.resource('home');
this.resource('shots');
});
Master.ShotsRoute = Ember.Route.extend({
model: function() {
return shots;
}
});
var shots = [{
id: '1',
title: "It Works!",
author: { name: "Luke Shiels", user: "0001"},
image: "assets/img/0001.png",
pubDate: new Date('26-11-2000'),
description: "A new shot, lol!"
}, {
id: '2',
title: "It also Works!",
author: { name: "Luke Shiels", user: "0001"},
image: "assets/img/0001.png",
pubDate: new Date('27-11-2000'),
description: "Another shot, lol!"
}];
次の「エラー」が表示されます:
http://i.imgur.com/fRLkaFQ.png
(申し訳ありませんが、画像を投稿するのに十分な担当者がいません)