<input type="text" id="csrval" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>">
<input type="text" id="csname" value="<?php echo $this->security->get_csrf_token_name(); ?>">
I have set csrf name and token value in codeigniter view Now I want to send these values to angularjs method
var tokenval = $('#csrval').val();
$rootScope.csrftokenval = tokenval;
var tokenname = $('#csname').val();
$rootScope.csrftokenname = tokenname;
//data: JSON.stringify({csrf_test_name:$rootScope.csrftokenval,page:page})
Not working for me ?? any solution ??