In the documentation there is a reference how to build standalone grid:
// home.component.ts
import { IGX_GRID_DIRECTIVES } from 'igniteui-angular';// import { IGX_GRID_DIRECTIVES } from '@infragistics/igniteui-angular'; for licensed package
@Component({ selector: 'app-home', template: '<igx-grid [data]="localData" [autoGenerate]="true"></igx-grid>', styleUrls: ['home.component.scss'], standalone: true, imports: [IGX_GRID_DIRECTIVES] /* or imports: [IgxGridComponent] */})export class HomeComponent { public data: Product [];}
But I wasn't being able to find stackblitz project with example that can be run specifically as standalone module. neither I can find references to the files used in the sample .. Can you provide me with either sample project of igx-grid as standalone component or reference where I can find it.
Thanks.
All good now?
Hello Michael,
I am glad I was able to assist you regarding this matter.
Thank you for using Infragistics components.
Regards, Riva Ivanova Associate Software Developer
I tried to upload 4.3 kb file here .. same as yesterday .. did not work... It is just FYI , .. otherwise I have enough to look at right now . Thanks.
Thank you for following up!
I have been looking into your clarifications and what I can say is that the ig new command is used to generate whole new projects, if you would like to generate only components in an Angular application, you could use the ig add command.
To address the following question:
but still do not understand how come I can not rebuild the project after node_modules deleted .. How to work with that. Thanks.
I was not able to reproduce the described behavior on my side and when generating a project, adding a grid, and running the application, the IgxGrid was displayed successfully on the respective URL route. Then, I deleted the node_modules (rm -rf node_modules/), and the package-lock.json file, and installed them again. On my side, everything worked as expected.
Additionally, you could create an Angular project with the standard ng new command and add components with the ng g c (generate component) command. This way you could define the IgxGrid template as desired and not use the predefined ones.
For example:
@Component({ selector: 'app-my-grid ', standalone: true, imports: [IGX_GRID_DIRECTIVES], templateUrl: './my-grid.component.html', styleUrl: './my-grid.component.scss' })
Then, you could define the IgxGrid structure inside the my-grid.component.html file as desired. If any additional components are used inside this html, they should be imported inside the imports array as well. Each import for each component could be found in the respective topic.
To conclude, however you choose to generate a new project or new component, the important part is to include the required imports inside the imports array in order to use the components inside the template.
Also, regarding sending zip files, it is possible to attach them in the forum message, however, there is a 1 MB restriction. The displayed message could be related to the size of the file. Please try uploading the file again and if you continue to experience this behavior, we could proceed to a private support case.
This could be achieved in our Customer Portal Support section here via the New support request button. There you could attach files that are up to 10 MB.
Please test these approaches and let me know if you need any further assistance regarding this matter.
Sincerely, Riva Ivanova Associate Software Developer
and also how to send zip files if needed..