Ember way to implement Contact us form

I've a website implemented using emberJS, It has a "contact us" page, now when someone fills up the form & submit the data I need to do implement a POST request. Do I need to create a model for this ? right now I just did $.post(...) .

I just wanted to know is there any much cleaner(or may I say emberish way) to implement this ?


IMHO, a ContactRequest model seems like the most idiomatic way to go about this. That way you can use the regular Ember facilities and later add features like a backend that shows pending contact requests and - depending on your use case - does things like sorting them by subject area etc.

链接地址: http://www.djcxy.com/p/65812.html

上一篇: 以最好的方式管理css和js

下一篇: Ember方式实现联系我们表格