我們?nèi)绾螌⒔Y(jié)果數(shù)據(jù)從 CodeIgniter 控制器傳遞到 AngularJS 控制器?在使用 jsonSuccess 代碼的 CodeIgniter 控制器中,我將數(shù)據(jù)傳遞給 AngularJS,但我想傳遞不同的 3 個變量我需要如何傳遞它們以及如何獲取數(shù)據(jù)?codeigniter 控制器代碼:$siteName = $CI->config->item('siteName'); $siteURL = site_url(); if($data['status'] == 'success') { $result = $this->LowCredit_model->info($data['data']); jsonSuccess($result,$siteName ,$siteURL,$result['succ_code'],$siteName,$siteURL); }角控制器代碼:$scope.init = function() { alert('init'); gdiztunnel.post( 'order/LowCredit', { id: $configId } ).then( function success (response) { response = response.data; if(response.status == 'success') { $scope.lowcreditCtrl.data = response.data;
1 回答

qq_花開花謝_0
TA貢獻1835條經(jīng)驗 獲得超7個贊
我已經(jīng)給了你解決方案這是重復(fù)的問題
$data['siteName'] = $CI->config->item('siteName');
$data['siteURL'] = site_url();
if($data['status'] == 'success') {
$data['result'] = $this->LowCredit_model->info($data['data']);
jsonSuccess($data);
}
- 1 回答
- 0 關(guān)注
- 119 瀏覽
添加回答
舉報
0/150
提交
取消