0

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.

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

6 Comments

OK, that's not supposed to be a dependency. I'll raise an issue and look at it.
I would like some more help from you, have tried to make the UI Grid responsive, if yes can you let me know how to do the same. Thanks !!
You can't make it responsive as such, but you can make it resize when the window resizes. The auto-resize feature is the best bet for doing that. ui-grid.info/docs/#/tutorial/213_auto_resizing
But my columns get collapsed when I resize the browser, the actual behavior should be a something like horizontal scroll should appear so all columns are visible and none of them are collapsed or shrink ed.
If you set your column width using % or * hen they will resize. If you set fixed width they shouldn't, although there were recent fixes in master in this area so you may need unstable.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.