Hi all,
I created a sample for select with multiple columns in AngularJS. which is working fine if I pass the value directly like this:
$scope.rowDatas = [
{ ID: "09-14-002880", PatientName: "PRAVEEN KUMAR", Gender: "Male", Age: "20", mobileNumber: 9879878971, patientId: "test" },
{ ID: "09-13-000188", PatientName: "VAR", Gender: "Male", Age: "20", mobileNumber: '', patientId: "ZXC12" },
{ ID: "09-05-019825", PatientName: "KARMA", Gender: "Male", Age: "29", mobileNumber: '', patientId: "ZA2545635" },
{ ID: "09-04-010524", PatientName: "FRANKLIN ANTHONY", Gender: "Male", Age: "20", mobileNumber: '', patientId: "Z7552396" },
{ ID: "09-08-009303", PatientName: "DARYOUSH", Gender: "Male", Age: "29", mobileNumber: '', patientId: "Z2548467" },
{ ID: "09-12-031048", PatientName: "SMITA", Gender: "Female", Age: "20", mobileNumber: 9880222187, patientId: "Z2296538" },
{ ID: "09-11-026001", PatientName: "ADITYA DILIP", Gender: "Male", Age: "29", mobileNumber: '', patientId: "Z2277913" }
];
But what I exactly need is I need to get the value from factory
dtfactory.getdata().then(function(response){
//$scope.rowDatas = response.data;
})
Here response.data
also contain same data.If I comment direct code and uncomment factory code its not working may I know where I did mistake? can any one help me this.
dtfactory.getdata()
should return promise. Or you may share your factory code too.