Emberのpre4リリースで作業しようとしていますが、ルーターでスタックしています。
というエラーが表示されますUncaught TypeError: Cannot Call method 'map' of undefined
。
関連するコード:
App.Router.map(function() {
this.route("about", { path: "/about" });
this.route("favorites", { path: "/favs" });
});
相対的なドキュメント。
Ember.jsとjQueryをロードしました。Emberpre4もエラーをスローしますUncaught TypeError: Object prototype may only be an Object or null
。
私は何か間違ったことをしていますか?ガイドは更新されていませんか?
私がこれまでに持っているコード:
window.App = Ember.Application.create({
ApplicationView: Ember.View.extend({
templateName: 'application'
}),
ApplicationController: Ember.Controller.extend({
}),
SiteView: Em.View.extend({
templateName: 'site-template'
}),
SiteController: Em.ArrayController.extend(),
});
App.Router.map(function() {
this.route("about", { path: "/about" });
this.route("favorites", { path: "/favs" });
});