History and JMVC controllers

20 views
Skip to first unread message

galfy

unread,
Oct 31, 2010, 7:55:55 AM10/31/10
to JavaScriptMVC
Hi JVMC folks,
I am quite new to JMVC and would like to do the following:

1. Have one index.html that handles all requests.
2. If I have url like index.html#controller/action this will call the
controller "controller" and the action "action".

How to implement point two in JVMC 2? I was thinking that including
only 'controller/history' in my plugins and writing a controller like
the one above should work.

<code>
/**
* @tag controllers
*/
jQuery.Controller.extend('inviteController',
/* @Static */
{
onDocument: true
},
/* @Prototype */
{
/**
init: function(el, message){
this._super(el)
// add here code that needs to be initialized in the beginning
},
*/

list: function(params){
alert('List Action was called')
//this.render(); // renders app/views/todos/list.ejs
}

});
</code>

But it does not work. After calling from the browser this URL or
clicking on link having this URL I do not get alert window with "List
Action was called".

Any idea how to dela with this and where there is more info or
tutorials for the JavaScriptMVC ?

Thanks in advance

Gal

Alexandre Gomes

unread,
Nov 1, 2010, 4:50:18 PM11/1/10
to javasc...@googlegroups.com
Could you please post yoiur question here:


--
You received this message because you are subscribed to the Google Groups "JavaScriptMVC" group.
To post to this group, send email to javasc...@googlegroups.com.
To unsubscribe from this group, send email to javascriptmv...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javascriptmvc?hl=en.


Reply all
Reply to author
Forward
0 new messages