app.factory( 'ActionMessageService' , function () { var objToReturn = {}; var _MESSAGE_DETAIL = { ERROR : { type : "ERROR" , bootstrapClass : "alert alert-danger" }, OK : { type : "OK" , bootstrapClass : "alert alert-success" }, INFO : { type : "INFO" , bootstrapClass : "alert alert-info" }, WARNING : { type : "WARNING" , bootstrapClass : "alert alert-warning" }, NOT_FOUND : { type : "ERROR" , bootstrapClass : "alert alert-danger" }, }; var _MESSAGE_STATUS = { 400: _MESSAGE_DETAIL.WARNING , 200: _MESSAGE_DETAIL.OK , 500: _MESSAGE_DETAIL.ERROR , 404: _MESSAGE_DETAIL.NOT_FOUND }; var _getActionMessage = function (response) { var actionMessage = response.data.Message; if (response.data.ModelState) { _.forEach(_.flatMap(response.data.ModelSta...