Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Using mojito-session-addon example
/*jslint anon:true, sloppy:true, nomen:true*/
YUI.add('home', function(Y, NAME) {
/**
* The home module.
*
* @module home
*/
/**
* Constructor for the Controller class.
*
* @class Controller
* @constructor
*/
Y.namespace('mojito.controllers')[NAME] = {
/**
* Method corresponding to the 'index' action.
*
* @param ac {Object} The ActionContext that provides access
* to the Mojito API.
*/
index : function(ac) {
ac.session.set("test", "test123");
Y.log(ac.session.get("test"));
ac.models.get('homeModelFoo').getData(function(err, data) {
if (err) {
ac.error(err);
return;
}
ac.assets.addCss('./index.css');
ac.done({
status : 'Mojito is working.',
data : data
});
});
}
};
}, '0.0.1', {
requires : ['mojito', 'mojito-assets-addon', 'mojito-models-addon', 'homeModelFoo', "mojito-session-addon"]
});
@madhankumarpalanisamy

i just set a session with .set
Could you tell me how to clear the session

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.