Tôi không tìm thấy bất kỳ tài liệu hay nào để bắt đầu với Ember.js. Xin hãy giúp tôi, Đây là một ví dụ đơn giản tôi đã thử từ http://emberjs.com/documentation/ Nhưng không có gì hiển thị trên màn hình.Bắt đầu với Ember.js
Error: MyApp is not defined
Javascript: app.js
MyApp.president = Ember.Object.create({
firstName: "Barack",
lastName: "Obama",
fullName: function() {
return this.get('firstName') + ' ' + this.get('lastName');
// Tell Ember that this computed property depends on firstName
// and lastName
}.property('firstName', 'lastName')
});
HTML
<p>
<script type="text/x-handlebars">
The President of the United States is {{MyApp.president.fullName}}.
</script>
</p>
tôi bao gồm tất cả các file JS từ nhận Kit bắt đầu.
"Tôi không tìm thấy bất kỳ tài liệu nào tốt" ??? Bạn đã xem http://emberjs.com/documentation/ chưa? –
Có, Nhưng, ví dụ trong tài liệu không hoạt động. xem mã của tôi –
Rất tiếc, xin lỗi. Se câu trả lời của tôi –