Support Topics Documentation Slack YouTube Blog

Load Data from Backendless with Angular 1

I wrote this code in 2 separate .js file (factory and controller) for frontend backendless environment. I need to get Data from Backendless to load it in a view.with Angular js 1.5
[right]
[/right]

NiceCashClient.rar (1.34MB)

Could you describe the problem?

I want to display data in the web page. I am using AngularJS 1.5.

I downloaded the Backendless sample https://github.com/Backendless/TODOs-Examples/tree/master/angularjs

When I ran it without changing anything in the code it ran perfectly, the tasks has been added and shown correctly.

In the code there is a section
var APP_ID = ‘xxxxxx-xxxxxx’;
var JS_SECRET_KEY = ‘xxxxxx-xxxxxx’;
var APP_VERSION = ‘xx’;

Those parameters where already filled when extracting the downloaded sample but when I change them to my Backendless APP_ID and JS_SECRET_KEY the application run and it add tasks but does not show them in the list.
There is a new table in the Backendless database called Todo which was created automatically when I ran it with my application keys.

Breifly the problem is that the tasks can be added to the Backendless server using my application keys but not shown in list in opposite of the downloaded sample which can be added and shown using the default application keys.

I have attached a ZIP file containing three images

  1. The image Backendless_Keys is showing the application running using the default Backendless keys provided with the downloaded sample, the data are shown in a list.
  2. The image MyApplication_Keys is showing the application running using my application keys, the data are not showing in the list.
  3. The image MyApplicationServer_Database is showing the Backendless server running using my application keys has created by himself a table called “Todo” and stored the record “Wash the car”. (With the console).

PrintScreens.rar (334.54kB)

http://support.backendless.com/public/attachments/c016ff78b21ec6a2c1128f30c42b4a6c.jpg</img>

Thank you infinitely for your reply
I found this piece of code
var todosQuery = {options: {pageSize: 100, sortBy: ‘order asc’}

I removed pageSize: 100, sortBy: ‘order asc’
and it worked like a sharm