The Wayback Machine - https://web.archive.org/web/20220126182623/https://github.com/dotnet/aspnetcore/issues/39784
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load a script from an external JavaScript file (.js) collocated with a component #39784

Open
vsfeedback opened this issue Jan 26, 2022 · 0 comments
Open

Comments

@vsfeedback
Copy link

@vsfeedback vsfeedback commented Jan 26, 2022

This issue has been moved from a ticket on Developer Community.


Microsoft Visual Studio Enterprise 2022 (64-bit) - Preview
Version 17.1.0 Preview 2.0

I am trying to follow the instructions at:
https://docs.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/?view=aspnetcore-6.0#load-a-script-from-an-external-javascript-file-js-collocated-with-a-component

A collocated js file in an RCL works fine. However, if I try to do the same in a Blazor server app I get an error that it can't find the file. Perhaps I just don't understand how to do this correctly?

! [JSDemoError.png] (https://aka.ms/dc/image?name=B8b10c349d34b4df9b9d877e918e077aa637779431597648847_JSDemoError.png&tid=8b10c349d34b4df9b9d877e918e077aa637779431597648847)

I've attached the solution:
[BlazorSvrJsDemo.zip] (https://aka.ms/dc/file?name=B70e1935b7e4e4d7893d492535d1b74b0637779432532194171_BlazorSvrJsDemo.zip&tid=70e1935b7e4e4d7893d492535d1b74b0637779432532194171)


Original Comments

Feedback Bot on 1/17/2022, 00:05 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.


Original Solutions

(no solutions)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants