Skip to content

Instantly share code, notes, and snippets.

@garunski
Created April 26, 2016 00:09
Show Gist options
  • Select an option

  • Save garunski/9d95aad37b4b83fb5a055ec3c3802248 to your computer and use it in GitHub Desktop.

Select an option

Save garunski/9d95aad37b4b83fb5a055ec3c3802248 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
var myApp = angular.module('myApp', ['ng-admin']);
myApp.config(['NgAdminConfigurationProvider', function(NgAdminConfigurationProvider) {
var nga = NgAdminConfigurationProvider;
// create an admin application
var admin = nga.application('Documentation Assistant Bot Admin').baseApiUrl('/api/');;
var lodash = nga.entity('lodashes');
lodash.listView().fields([
nga.field('Id'),
nga.field('FunctionName').isDetailLink(true),
nga.field('ClassName')
]);
lodash.showView().fields([
nga.field('FunctionName').isDetailLink(true),
nga.field('ClassName'),
nga.field('Example'),
nga.field('Documentation'),
nga.field('Arguments'),
nga.field('Returns'),
]);
lodash.creationView().fields(lodash.showView().fields());
lodash.editionView().fields(lodash.showView().fields());
lodash.identifier(nga.field('Id'));
admin.addEntity(lodash);
nga.configure(admin);
}]);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment