I am green hand in ng-admin, and the question is: Is it possible to connect to the remote server to get data? such as.
var admin = nga.application('QDNS Admin') .baseApiUrl('http://remote host/');
Many thanks in advance
I am green hand in ng-admin, and the question is: Is it possible to connect to the remote server to get data? such as.
var admin = nga.application('QDNS Admin') .baseApiUrl('http://remote host/');
Many thanks in advance
In your admin.js file you have to configure your API endpoints like this:
myApp.config(['NgAdminConfigurationProvider', function (nga) {
// create an admin application
var admin = nga.application('Name of your Admin')
.baseApiUrl('http://localhost:8080/api/');
//if you have an entity called users
nga.configure(admin);
}
In your admin.js file you have to configure your API endpoints like this:
myApp.config(['NgAdminConfigurationProvider', function (nga) {
// create an admin application
var admin = nga.application('Name of your Admin')
.baseApiUrl('http://localhost:8080/api/');
//if you have an entity called users
// the API endpoint for this entity will be 'http://localhost:8080/api/users/
var user = nga.entity('users').identifier(nga.field('_id'));
user.listView()
.fields([
nga.field('username'),
nga.field('email'),
nga.field('password'),
nga.field('lastname'),
nga.field('firstname'),
nga.field('created_at'),
nga.field('updated_at')
]);
admin.addEntity(user);
nga.configure(admin);
}
And in your server.js you must have define a route