0
我有一個這樣的API:如何解析_data到數組?
public class Calendar : FullAuditedEntity
{
public string EventName { get; set; }
public string Description { get; set; }
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
}
public List<Calendar> GetCalendar()
{
var result = _calendarRepository.GetAll().ToList();
return new List<Calendar>(result.MapTo<List<Calendar>>());
}
我可以從視圖成功調用這個API並返回數據揚鞭:
var _$calendarService = abp.services.myproject.calendar;
var _data = _$calendarService.getCalendar();
這裏是_data的價值:
Object { resolve: Deferred/</e[f[0]](), resolveWith: fireWith(a, c), reject: Deferred/</e[f[0]](), rejectWith: fireWith(a, c), notify: Deferred/</e[f[0]](), notifyWith: fireWith(a, c), state: state(), always: always(), then: then(), promise: promise(a), 4 more… }
那麼如何解析這個_data
到一個數組使用(而不是jTable)
非常感謝你,兄弟! –