Open Closed

Unable to call services from js in "Public" project #7434


User avatar
0
jwhitlock created
  • ABP Framework version: v8.1.1
  • UI Type: MVC
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes (MVC)
  • Exception message and full stack trace:
  • Uncaught TypeError: Cannot read properties of undefined (reading 'portal') at HTMLDocument.<anonymous> (index.js:5:39) at mightThrow (jquery.js?_v=638459545341710000:3489:29) at process (jquery.js?_v=638459545341710000:3557:12)
  • Steps to reproduce the issue:
    • In the "Public" project, when attempting to access services in the "Application" project from js files, the variables are not getting populated in the same manner as they are in the "Web" project. It would help us to know how these objects in the attached screenshots are supposed to get initialized, and why they are not getting initializing in our "Public" project.

Thanks! Jacob


1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    You can check the document to understand it well

    https://docs.abp.io/en/abp/latest/UI/AspNetCore/Dynamic-JavaScript-Proxies https://docs.abp.io/en/abp/latest/UI/AspNetCore/Static-JavaScript-Proxies

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11