简体   繁体   中英

Blazor load JavaScript just in Component that require <script>

I want to implement an external (Google Maps) and it is only required in two Pages of the Blazor Server Side Application.

So my question is if it is possible to just load the in this Pages and not directly in _Hosts File. If yes how can I achieve this?

Yes, it is possible in .Net 5.0 Read here

See this for an introduction and code samples

See this answer

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM