Hi.
I have added in the demo application for the microchip motes and it work great.
Just wanting to extend the admin menu options and the demo shows a great example but I am having problems understand how to reference the users.
In the main admin java script file 'admin.js' you can have a 'reference_many' to add many users to an item but if I try this in the demo application it fails.
function addPrivateMenu(nga, admin, dashL, dashR) {
var motes = nga.entity('motes')
.identifier(nga.field('devaddr'));
// ---- motes
motes.listView().fields([
nga.field('devaddr').label('DevAddr').isDetailLink(true),
nga.field('Site'),
nga.field('Tank')
]);
motes.creationView().fields([
nga.field('devaddr').label('DevAddr').isDetailLink(true),
nga.field('Site'),
nga.field('Tank'),
nga.field('admins', 'reference_many').label('Administrators') <<<------- THIS IS THE PROBLEM.
.targetEntity(users)
.targetField(nga.field('name'))
]);
// add to the admin application
admin.addEntity(motes);
admin.menu()
.addChild(nga.menu(motes).icon('<span class="fa fa-map-marker fa-fw"></span>'));
}
because the demo app is extending the angular module I am not sure how you can reference the targetEntity is the main module.
Any thoughts or advice greatly appreciated.
MPC.