SpreadJS V15 with Angular Dependency Issues

Posted by: harry.feldman on 21 November 2023, 6:49 am EST

    • Post Options:
    • Link

    Posted 21 November 2023, 6:49 am EST

    The documentation at this link https://developer.mescius.com/spreadjs/docs/v15/javascript_frameworks/angular

    is insufficient to build a spreadjs project with angular. There are countless dependency issues and zero documentation regarding dependencies. Please provide a package.json which will allow the example code to run with Angular version 14

  • Posted 21 November 2023, 7:46 pm EST

    Hi,

    I was able to create a SpreadJS sample with Angular 14 by following the steps at https://developer.mescius.com/spreadjs/docs/v15/javascript_frameworks/angular.

    It is important to note that “npm install -g @angular/cli” command will install the latest version of the Angular i.e. 17. So, to create an Angular 14 project, you may install Angular 14 globally in your system with “npm i -g @angular/cli@14” command or use command “npx -p @angular/cli@14 ng new spread-angular-sample”.

    Please refer to the attached sample for more understanding.

    sample: spread-angular-sample.zip

    Also, if you want to use charts, pdf, shapes, etc in your project then you would need to install their respective packages and import them. For instance, chart support is provided with “@grapecity/spread-charts” package. You can install it using “npm i ‘@grapecity/spread-charts’” package and include it using “import ‘@grapecity/spread-charts’” statement.

    You may refer to https://developer.mescius.com/spreadjs/docs/v16/getstarted to learn more about different packages in SpreadJS for different features. You can also refer to demos at https://developer.mescius.com/spreadjs/demos/ which includes different packages in different samples.

    Regards

  • Posted 22 November 2023, 2:48 am EST

    Thank you for your reply. I guess the “ng new” command having been executed with angular 16 was causing problems, even when angular 14 is explicitly specified in package.json.

    Might be a good idea to document that “npx ‘@angular/cli@14’ new” should be used rather than simply “ng new”

  • Posted 22 November 2023, 5:14 pm EST

    Hi,

    We are glad that your issue has been resolved.

    It seems the issue was caused because you had Angular 16 installed and Angular 14 specified in the package.json file. Please note that SpreadJS Doc demonstrates the use of SpreadJS with the latest version of Angular. That is why, it does not specify a particular Angular version in the command “npm install -g @angular/cli”.

    We appreciate your suggestion.

    Regards & Thanks

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels