Search Posts

Category: codeigniter

How to post Dynamic input field using angularjs in codeigniter

Here is My problem Below. Dynamics fields come from the database. But I am unable to post my field in angularjs. I want to post multiple records at a time but, it is still not posted. How to solve this problem. Because while posting multiple records with respect to multiple products, but it is not posted. if you have any solutions and suggestion please help me to come out this problem. Html View:- <form method=”POST” […]

JWT implementation on Angualrjs – Codeigniter application

I am working with Angualrjs and Codeigniter and currently working to implement the JWT token as described in this doc. I am getting following error in browser console while running my app. ReferenceError: i18n is not defined at Object.fn (directives.js:27) at h.$digest (angular.js:12251) at h.$apply (angular.js:12516) at f (angular.js:8204) at F (angular.js:8412) at XMLHttpRequest.x.onreadystatechange Any suggestion please to resolve this issue. Source: AngularJS

front end framework with codeigniter

Currently, I am using AngularJs with CodeIgniter for making a large project. And to improve user experience I use a lot of ajax to avoid form submits and redirections. But I with my current toolset I am not able to accomplish what I ultimately want. I want components of DOM only to be loaded when the user actually need them. For example, I wish to provide a login via facebook option. In this case(as per […]

CI_Session_files_driver Error

Haii All, Iam using Codeigniter v3, and angularjs. my application was getting this below error in randomly. How to solve this issue. Class CI_Session_files_driver contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (SessionHandlerInterface::open) Fatal error: Class CI_Session_files_driver contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (SessionHandlerInterface::open) in E:xampphtdocstbookingsystemlibrariesSessiondriversSession_files_driver.php on line 49 A PHP Error was encountered Severity: Error Message: Class CI_Session_files_driver […]

404 error when trying to access codegniter controller in angularjs controller

I am trying to access the function of codegniter controller through angular js controller but it gives 404 error my controller file path is domain/projects/test/application/controller/web/indexcontent.php path of my angular file domain/projects/test/website/assests/js/custom/controller/indexCtrl.js code: newService.postMethod(data,’Web/indexContent/indexContent’).then(function(resp) {} Source: AngularJS

not able to alert json data in ajax success call

I am not able to alert the first name of the user $scope.Edit=function(id){ $ “<?php echo BASE_URL;?>Registration/Edit”, {id :id} ).then(function(response){ var myJSON = JSON.stringify(; alert(myJSON); //alert(response.first_name); $ = response.first_name; name(); //alert(; }); } After This function in angular js: In json response i am getting: {“id”:”4″,”first_name”:”Rupal”,”last_name”:”Pant”} my php function which return the json value is: public function Edit(){ $data = json_decode(file_get_contents(“php://input”)); $id=$data->id; $query = “select * from tbl_user where id='”.$id.”‘”; $check = $this->db->query($query); $result = […]

How to update angular data without refreshing the page?

I have some data in a database table that I used angular to show it. And I use the following script which is in the footer to do that: <script !src=””> var app = angular.module(‘enterprise’, []); app.controller(‘entercontroller’, function($scope, $http){ console.log(‘success’); $‘http://localhost/clinic/Groups_/load_data’) .then(function(mydata){ console.log(mydata); $scope.datas =; }); $scope.loadData=function(){ $‘http://localhost/clinic/Groups_/load_data’) .then(function(mydata){ $scope.datas.push(; }); } }); And my load_data() function in my controller like: public function load_data(){ $data[“groups”] = $this->Groups->fetch_groups(); return $this->output ->set_status_header(200) ->set_content_type(‘application/json’, ‘utf-8’) ->set_output(json_encode($data[“groups”], JSON_PRETTY_PRINT […]

AngularJS – POST JSON Array To MySQL Database – PHP

Okay so I am working on a Codeigniter 3.0 application and attempting to post an array of JSON data to the database. But I am not getting an logs regarding the issue and cant seem to find out what I am doing wrong. Any help would be greatly appreciated. Right now here is the following Angular Array: $scope.packageDetails = [ {ID: 1898, Number: 909, Name: “test”, category: “cat”}, {ID: 1899, Number: 919, Name: “test 2”, […]

How to fetch a value from a database in a <p> tag and to post them into database with the same id

I am new to angularjs and I want to make an application just like a Google keeps notes. I succeed in fetching the data inside the <p> tag in the list format. My condition is whenever I make any changes in the <p> tag, it is in the database. I tried to do this with ngKeyup() but I did not succeed so I removed ngKeyup(). How can I do this with the ajax jquery or […]

CodeIgniter 3 Implement Promise

My CI app makes API call to third party Rest API server which will be consumed by front end. At first, front end app will hit my CI app and which in turn will hit third party LogInAPI(session valid for 15 mins), and after login we need to hit subsequent API calls by passing the key(response of loginApi) in header. So basically I need to hit loginAPI for every 15 minutes. I am trying angular […]

Next Page »