Comments (11)
It works perfectly.
You can close this ticket.
Gracias.
from angular-slickgrid.
indeed there isn't any Services exported anymore in version 1.x
, it is intended because all these services are non-singleton (except inside the component itself) and should not be provided as DI. If there's anything to do, it has to be through the AngularSlickgrid
instance. I did ask you some questions here when I was doing the refactoring, you told me it was ok to remove all DI.
All Services are now exposed inside the AngularSlickgrid
instance and that is what you should be using. You will need to work around that instead of using DI and Providers
from angular-slickgrid.
@sabeurch
By the way, your Grid Component is still part of my lib and I got it working with some changes, so you should see what changed in that swt grid component. It's actually a good thing that you made it part of my lib, I made sure the refactoring still had that external pagination working before releasing anything :P
from angular-slickgrid.
@ghiscoding
From inside the Angular slick grid project all is OK, demo is working fine,
But, it get not working in an external project unless I provide dependencies.
Please confirm if you already worked with it as a library installed from npm ?
from angular-slickgrid.
The GitHub demo is also working fine with your SWT Grud Component, it's pulling Angular-Slickgrid
from npm, it's a separate repo, you can see it here
from angular-slickgrid.
Good to hear about that. So problem is probably in my migration. I'll compare the 2 versions in the demo, see what changes been done, and apply to my project. I'll write sooner.
from angular-slickgrid.
Unfortunately, I tried several times without proving the services, but allways same error.
Maybe an issue to do with versions?
Mines are ("@angular/cli": "1.5.4", "@angular/core": "^5.0.0", node -v v8.11.2 )
To keep on my workaround, would you please make available for the public those 2 services: FilterFactory and SlickgridConfig.
You will just export them from:
"src\app\modules\angular-slickgrid\filters\index.ts" => export * from './filterFactory';
And
"src\app\modules\angular-slickgrid\index.ts" => export { SlickgridConfig } from './slickgrid-config';
Thanks in advance.
from angular-slickgrid.
The 2 files you mentioned are new files in version 1.x
and yes I didn't export them because they are used internally. Not sure why you need them exported when you are working with Pagination?
You know that you can easily clone the repo locally and run the VSCode task "Start Library Dev" (or run npm start in console). All the examples are within the lib. Isn't that easier for you to test what works on your side first?
from angular-slickgrid.
@ghiscoding ,
I am working with and without pagination.
I need all those services
providers :[ AngularSlickgridComponent, GridService, ControlAndPluginService, ExportService,
FilterService, SortService, GridStateService, ResizerService,
FilterFactory, SlickgridConfig]
to be provided internally in the SwtCommonGrid component (the componet that wraps AngularSlickGrid component).
All of those services are provided locally to the SwtCommonGrid component, which means I am not using them as Singletons.
If I do not povide them, then I'll have this error:
ERROR Error: Uncaught (in promise): Error: StaticInjectorError(AppModule)[MyGridTestComponent -> GridService]:
StaticInjectorError(Platform: core)[MyGridTestComponent -> X]:
NullInjectorError: No provider for X!
But, as services FilterFactory and SlickgridConfig are not publically exported, Yes, I did a clone on version [email protected] , did the changes to make them exported (as clarified in my previous comment), created the tgz and imported it in my project.
All features are working on my side, as well as for All examples in the SlickGrid project.
Thanks,
from angular-slickgrid.
I exposed the SlickGridConfig
and FilterFactory
in latest version 1.1.0
, both are exported through the angular-slickgrid\index.ts
Note, in your comment, you mentioned:
You will just export them from:
"src\app\modules\angular-slickgrid\filters\index.ts" => export * from './filterFactory';
This was incorrect, since it was throwing a warning of circular dependency. Exporting it inside the Angular-Slickgrid index.ts
(as mentioned on top) is ok though.
I don't want to expose all the Services, so hopefully that is enough for you to get going.
from angular-slickgrid.
Many thanks Ghislain !
I'll install and give it a try, then confirm the closure of this ticket.
from angular-slickgrid.
Related Issues (20)
- Frozen columns do not fit in viewport HOT 3
- The Multi-column tri-state sorting option doesn't work HOT 2
- Boolean column with filter collection and render html not working, displays true/false HOT 7
- Update Step By Step Install Wiki page HOT 10
- Example 22 keeps formatter components alive outside of grid HOT 20
- Example 22 shows temp ng-template being rendered for a short period
- cell highlighted stays on the same position even when filtered HOT 1
- Attach Angular Component in AsyncPostRender and keep it running HOT 2
- I have issues with Editor text box. HOT 6
- I am getting error when I use multipleSelect . "Cannot find type definition file for 'trusted-types'. " HOT 9
- Shared module gridOptions seetings not preserve in page module HOT 15
- All items in grid appear highlighted after adding an item to the grid HOT 9
- Incorrect dataContext is passed in `onSave` callback using composite editor HOT 6
- Polyfills ERROR TypeError: Function.prototype.toString requires that 'this' be a Function at Boolean.toString (<anonymous>) HOT 25
- Custom header and footer templates, like for Aurelia
- No data warning stays if data lazy loaded and gridOptions changed HOT 12
- Angular slickgrid upgrade does not working HOT 3
- between Operator HOT 1
- Angular esbuild error on DomPurify with rowDetailView and no pre/post template HOT 5
- CSP compliance HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-slickgrid.