Saturday, 22 April 2017

How to call an exports function of a controller in the same controller?

I have 2 functions,

exports.first = function () {
     second('hai');
}

exports.second = function (type) {
      console.log(type);
}

But when i call the first function from another controller,it says second is not a function.Can anyone please help me.Thanks.



via MMR

No comments:

Post a Comment