Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting started #286

Open
Asaf-Malin opened this issue Jul 28, 2023 · 1 comment
Open

Getting started #286

Asaf-Malin opened this issue Jul 28, 2023 · 1 comment

Comments

@Asaf-Malin
Copy link

Asaf-Malin commented Jul 28, 2023

Please describe the feature you would like to request.

It seems like you made a lot of effort making it easier to get started, especially in the dedicated website. Even though, I failed to get started. The website shows installation instruction (ng add @pebula/ngrid), but it doesn't give simple examples what to do after the installation. I eventually found the demos and the tiny buttons leading to their code, but when I copy code to my own project, I get errors like:
Error: src/app/contacts/contacts-grid/contacts-grid.component.ts:33:13 - error TS2769: No overload matches this call.
Overload 1 of 2, '(rowOptions: { header?: PblMetaRowDefinitions | undefined; footer?: PblMetaRowDefinitions | undefined; }, ...defs: PblColumnDefinition[]): PblColumnFactory', gave the following error.

I tried to look for a working stackblitz, they aren't mentioned in the website.
-Can it be added to the website?
I found link in Github page, and it runs on stackblitz, but when I download the project, I get the following errors:

./src/app/app.component.ts:109:13-35 - Error: Should not import the named export 'version' (imported as 'cdkPackageJson') from default-exporting module (only default export is available soon)

./src/app/app.component.ts:110:15-39 - Error: Should not import the named export 'version' (imported as 'ngridPackageJson') from default-exporting module (only default export is available soon)

./src/app/app.component.ts:111:23-55 - Error: Should not import the named export 'version' (imported as 'ngridMaterialPackageJson') from default-exporting module (only default export is available soon)

Error: src/app/datasource/index.ts:16:12 - error TS2339: Property 'default' does not exist on type '{ id: number; name: string; company: string; department: string; country: string; email: string; sales: number; rating: number; feedback: number; address: string; }[]'.

16 return x.default ?? x;

What is the use-case or motivation for this proposal?

Is there anything else we should know?

@Asaf-Malin
Copy link
Author

I removed x.default ??
and changed to

import cdkPackageJson from '@angular/cdk/package.json';
import ngridPackageJson from '@pebula/ngrid/package.json';
import ngridMaterialPackageJson from '@pebula/ngrid-material/package.json';

and added
"allowSyntheticDefaultImports": true,

to make it work.
I can open PR if someone here to merge it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant