GithubHelp home page GithubHelp logo

Comments (11)

sabeurch avatar sabeurch commented on May 17, 2024 1

It works perfectly.
You can close this ticket.
Gracias.

from angular-slickgrid.

ghiscoding avatar ghiscoding commented on May 17, 2024

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.

ghiscoding avatar ghiscoding commented on May 17, 2024

@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.

sabeurch avatar sabeurch commented on May 17, 2024

@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.

ghiscoding avatar ghiscoding commented on May 17, 2024

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.

sabeurch avatar sabeurch commented on May 17, 2024

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.

sabeurch avatar sabeurch commented on May 17, 2024

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.

ghiscoding avatar ghiscoding commented on May 17, 2024

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.

sabeurch avatar sabeurch commented on May 17, 2024

@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.

ghiscoding avatar ghiscoding commented on May 17, 2024

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.

sabeurch avatar sabeurch commented on May 17, 2024

Many thanks Ghislain !
I'll install and give it a try, then confirm the closure of this ticket.

from angular-slickgrid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.