question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JS Proxy Generation in Angular client

See original GitHub issue

I 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:closed
  • Created 5 years ago
  • Comments:18 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
ismcagdascommented, Nov 29, 2018

@iyilm4z it would be great if you can send a PR to solve it 😄 .

0reactions
ismcagdascommented, Nov 30, 2018
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found