JS Proxy Generation in Angular client
See original GitHub issueI created an application service and i wanted to have it’s javascript proxy. I’ve read this doc and created a method in AppPreBootstrap.ts to extend abp object but i couldn’t succeed. The method which i’m calling exists here, but my ajax request cant find it. Angular/TypeScript proxies are ok after running nswag/refresh.bat. But how about javascript proxies? What i’m missing? If this issue would be approved, i would like to take responsibility to fix it.
private static getAbpServiceProxies(callback: () => void): JQueryPromise<any> {
return abp.ajax({
url: AppConsts.remoteServiceBaseUrl + 'AbpServiceProxies/GetAll?type=jquery',
method: 'GET',
headers: {
Authorization: 'Bearer ' + abp.auth.getToken(),
'.AspNetCore.Culture': abp.utils.getCookieValue("Abp.Localization.CultureName"),
'Abp.TenantId': abp.multiTenancy.getTenantIdCookie()
}
}).done(result => {
$.extend(true, abp, result);
callback();
});
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:18 (10 by maintainers)
Top Results From Across the Web
Angular — How To Proxy To Backend Server
This article describes how to use proxy.config.json for proxying to backend server.
Read more >angular proxy configuration for development and production
Hello @DavidSagang, this proxy.config.json only works in development because angular server uses it. CORS errors happen when in the browser you ...
Read more >Configure a proxy for your API calls with Angular CLI - | juri.dev
Learn how to configure the Angular CLI to proxy API calls to your backend and thus avoid having to deal with CORS headers....
Read more >Building and serving Angular apps
Use the proxying support in the webpack development server to divert certain URLs to a backend server, by passing a file to the...
Read more >UI/Angular/Service Proxies | Documentation Center | ABP.IO
The generate-proxy command generates one service per back-end controller and a method (property with a function value actually) for each action in the ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@iyilm4z it would be great if you can send a PR to solve it 😄 .
See https://github.com/aspnetboilerplate/module-zero-core-template/pull/358 for the working example.