Reputation: 4479
I am trying to implement export feature with angularjs ui-gird as explained here:
http://ui-grid.info/docs/#/tutorial/206_exporting_data
But I am getting js error something like this:
Error: [$injector:unpr] http://errors.angularjs.org/1.3.10/$injector/unpr?p0=uiGridSelectionConstan…nConstants%20%3C-%20uiGridExporterService%20%3C-%20uiGridExporterDirective
Here is my code snippet:
var app = angular.module('CustomerModel', ['ngMessages', 'CommonDirective', 'ui.grid', 'ui.grid.autoResize', 'ui.grid.exporter']);
<div ui-grid="Customers" class="grid" ui-grid-auto-resize ui-grid-exporter></div>
I think it is related with dependency injection issue but cannot figure out the solution.
Upvotes: 0
Views: 1012
Reputation: 6650
Hmmm. That should work - it's what the tutorials use, and what I use in my code.
It does look like you're missing perhaps uiGridSelection though - perhaps try including that. I didn't intend to write exporter with a dependency on selection, but perhaps one has crept in. The tutorial definitely uses selection.
Upvotes: 2