Page 1 of 5
Setup Stimulsoft with Angular 5
Posted: Sat Apr 28, 2018 2:14 pm
by mrapi
Hi.
I'm looking for a way to use Stimulsoft with a Angular + Asp Core project
In my existing project I've run
I've found this Angular sample:
https://github.com/stimulsoft/Samples-J ... t%20viewer
that seems to be for Angular 4 but latest stable version is 5 where are couple changes regarding
Http '@angular/http'
now it is
HttpClient ('@angular/common/http') and the code no longer works for me,got this error:
Code: Select all
Argument of type is not assignable to parameter of type 'HttpRequest<any>'
on this line:
Code: Select all
this.http.request('reports/Report.mdc').subscribe((data: Response) => {..
any fix for tat?
thanks
Re: Setup Stimulsoft with Angular 5
Posted: Sat Apr 28, 2018 2:37 pm
by mrapi
I've test publish with latest designer version 2018.2.2 and export is done for angular 4.0
package.json.json:
Code: Select all
...............
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/core": "^4.0.0",
.....
using that code with latest version gives me that error:
Code: Select all
ERROR Error: StaticInjectorError(AppModule)[EditComponent -> Http]:
StaticInjectorError(Platform: core)[EditRezComponent -> Http]:
NullInjectorError: No provider for Http!
at _NullInjector.get (vendor.js?v=9Ivn16CMraJlulcDOIp1N98O9BUnv5K4GBK8W_BziXw:2013)
at resolveToken (vendor.js?v=9Ivn16CMraJlulcDOIp1N98O9BUnv5K4GBK8W_BziXw:2311)
at tryResolveToken (vendor.js?v=9Ivn16CMraJlulcDOIp1N98O9BUnv5K4GBK8W_BziXw:2253)
at StaticInjector.get (vendor.js?v=9Ivn16CMraJlulcDOIp1N98O9BUnv5K4GBK8W_BziXw:2121)
at resolveToken (vendor.js?v=9Ivn16CMraJlulcDOIp1N98O9BUnv5K4GBK8W_BziXw:2311)
at tryResolveToken (vendor.js?v=9Ivn16CMraJlulcDOIp1N98O9BUnv5K4GBK8W_BziXw:2253)
at StaticInjector.get (vendor.js?v=9Ivn16CMraJlulcDOIp1N98O9BUnv5K4GBK8W_BziXw:2121)
at resolveNgModuleDep (vendor.js?v=9Ivn16CMraJlulcDOIp1N98O9BUnv5K4GBK8W_BziXw:11865)
at NgModuleRef_.get (vendor.js?v=9Ivn16CMraJlulcDOIp1N98O9BUnv5K4GBK8W_BziXw:13098)
at resolveDep (vendor.js?v=9Ivn16CMraJlulcDOIp1N98O9BUnv5K4GBK8W_BziXw:13588)
thanks
Re: Setup Stimulsoft with Angular 5
Posted: Mon Apr 30, 2018 7:49 pm
by HighAley
Hello.
We can't reproduce the issue with publishing.
Could you send us a sample of what you get?
We will try to create a sample project with Angular 5.
Thank you.
Ticket reference: #6117
Re: Setup Stimulsoft with Angular 5
Posted: Tue May 01, 2018 8:08 am
by mrapi
hi
attached file it is a webpack project+asp core
Re: Setup Stimulsoft with Angular 5
Posted: Thu May 03, 2018 7:21 am
by HighAley
Hello.
We have created a sample for Angular5.
We will make necessary changes in the Publish feature.
Thank you.
Re: Setup Stimulsoft with Angular 5
Posted: Thu May 03, 2018 7:34 am
by mrapi
Hi.thanks for your answer
my project is based on webpack,using your code I've got t ReferenceError: Stimulsoft is not defined:
Code: Select all
SchComponent.html:131 ERROR ReferenceError: Stimulsoft is not defined
at EditRezComponent.ngOnInit (edit-rez.component.ts:116)
at checkAndUpdateDirectiveInline (vendor.js?v=Gl_Wz-bW9PAUbMRuBpaAt69ZISzBxTDQSUKoN28QJdw:20660)
at checkAndUpdateNodeInline (vendor.js?v=Gl_Wz-bW9PAUbMRuBpaAt69ZISzBxTDQSUKoN28QJdw:22184)
at checkAndUpdateNode (vendor.js?v=Gl_Wz-bW9PAUbMRuBpaAt69ZISzBxTDQSUKoN28QJdw:22127)
at debugCheckAndUpdateNode (vendor.js?v=Gl_Wz-bW9PAUbMRuBpaAt69ZISzBxTDQSUKoN28QJdw:23020)
at debugCheckDirectivesFn (vendor.js?v=Gl_Wz-bW9PAUbMRuBpaAt69ZISzBxTDQSUKoN28QJdw:22961)
at Object.eval [as updateDirectives] (SchComponent.html:131)
at Object.debugUpdateDirectives [as updateDirectives] (vendor.js?v=Gl_Wz-bW9PAUbMRuBpaAt69ZISzBxTDQSUKoN28QJdw:22946)
at checkAndUpdateView (vendor.js?v=Gl_Wz-bW9PAUbMRuBpaAt69ZISzBxTDQSUKoN28QJdw:22093)
at callViewAction (vendor.js?v=Gl_Wz-bW9PAUbMRuBpaAt69ZISzBxTDQSUKoN28QJdw:22444)
thanks
Re: Setup Stimulsoft with Angular 5
Posted: Thu May 03, 2018 7:39 am
by mrapi
Aslo I've put stimulsoft folder (with stimulsoft.reports.js,stimulsoft.viewer.js,stimulsoft.designer.js) in node_module then in webpack.config.vendor.js I've added:
Code: Select all
const nonTreeShakableModules = [
............
"stimulsoft/stimulsoft.reports.js",
"stimulsoft/stimulsoft.viewer.js",
"stimulsoft.designer.js"
];
+ recompiled with webpack : webpack --config webpack.config.vendor.js
Re: Setup Stimulsoft with Angular 5
Posted: Fri May 04, 2018 8:14 am
by Lech Kulikowski
Hello,
Is the issue was resolved?
Thank you.
Re: Setup Stimulsoft with Angular 5
Posted: Fri May 04, 2018 8:18 am
by mrapi
Hi.no,the same error as above:
ERROR ReferenceError: Stimulsoft is not defined
Re: Setup Stimulsoft with Angular 5
Posted: Fri May 04, 2018 1:56 pm
by Lech Kulikowski
Hello,
We compile our references with Angular cli and specify scripts in .angular-cli.json file
You should configure references in the webpack.
Thank you.