Ember アプリをセットアップしようとしていますが、奇妙な動作をしています。2 つのルートを設定しました。「welcome」は「/」にマップされます。「機能」は「/features」にマッピングされます。「/」に移動すると、ウェルカム テンプレートが正しくレンダリングされます。しかし、「/features」に移動すると、まだウェルカム テンプレートがレンダリングされます。
この jsbin は実際には正しく動作します: http://jsbin.com/OSoFeYe/1ですが、私のアプリからの以下のコードは動作しません。
App.Router.map(function() {
this.route("welcome", {path: "/"});
this.resource("features", {path: "/features"}, function() {
this.route("new");
});
});
App.FeaturesIndexRoute = Ember.Route.extend({
});
<body>
<div class="container">
<script type="text/x-handlebars">
<h1>rendered application template</h1>
{{outlet}}
</script>
<script type="text/x-handlebars" data-template-name="features">
<h2>Render features</h2>
<h6>Done features template</h6>
</script>
<script type="text/x-handlebars" data-template-name="welcome">
<h2>Render welcome</h2>
</script>
</div>
</body>
この問題に対する洞察をいただければ幸いです。