I created the following object:
app.state = {
message: {
clear: function() {
message.error = null;
message.text = null;
},
alert: function(text) {
message.error = true;
message.text = text;
},
set: function(text) {
message.error = null;
message.text = text;
},
error: null,
text: null,
}
}
However, when I call app.state.message.set ('abc'), I get an undefined error message. Can someone tell me how can I do this job? Is there a way to set the parent object?
user1464139
source
share