我创建了一个功能
<button data-toggle="modal" ng-click="edit(school.school_ID)" data-target="#edit-data" class="btn btn-primary">Edit</button>
传递给AngularJS控制器
$scope.edit = function(id)
{
$http({
method : 'GET',
url: 'mycontroller/myfun',
}).then(function(data){
console.log(data);
$scope.form = data;
});
};
访问mycontroller / myfun
public function myfun(id)
{
$q = $this->db->get_where('tablename', array('school_ID' =>
id));
echo json_encode($q->row());
}
问题在哪里