내가 콘솔의 응답 섹션에서 검사 할 때 나는 도서관 philsturgeon/CodeIgniter의-restserver 를 사용하여 JSON을 가져 오는하고, 내가 올바른 JSON 값이는 정의하기
처럼 돌려받을this: [{name:test,address:test},{name:test2,address:test2}].
정면에서는이 값을 템플릿에 표시하고 싶습니다. 하지만 <%= JSON.stringify(ledgers) %>
일 때 {"readyState":1}
을 반환합니다.
나는 이런 식으로 내보기에서 템플릿을 호출 귀하 올바르게 fetch
방법을 사용하지 않는
public function index_get()
{
$this->response($this->db->get('ledgers')->result());
}
업데이트 된 답변보기 – nemesv