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

Getting Error with a very simple page #72

Open
syazdian opened this issue Jun 16, 2023 · 0 comments
Open

Getting Error with a very simple page #72

syazdian opened this issue Jun 16, 2023 · 0 comments

Comments

@syazdian
Copy link

syazdian commented Jun 16, 2023

I just have this simple page:

@using Texnomic.Blazor.JsonViewer
<JsonViewer @ref="JsonViewerInstance"></JsonViewer>
@code { 
    public string jsonString { get; set; } = "{\"RebateType\": [ \"Commission\", \"Downpayment\", \"Tax Rebate\" ]}";
    protected JsonViewer JsonViewerInstance { get; set; 
    protected override async Task OnAfterRenderAsync(bool firstRender)
    {
        await JsonViewerInstance.Render(jsonString);
        await base.OnAfterRenderAsync(firstRender);
    }
}

I followed all the instructions and added JQuery as well.
but I get this error in loading:

crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: $ is not a function
      TypeError: $ is not a function
          at Object.JsonViewer (https://localhost:7131/_content/Texnomic.Blazor.JsonViewer/scripts/JsonViewer.js:9:13)
          at https://localhost:7131/_framework/blazor.webassembly.js:1:3337
          at new Promise (<anonymous>)
          at Object.beginInvokeJSFromDotNet (https://localhost:7131/_framework/blazor.webassembly.js:1:3311)
          at Object.Gt [as invokeJSFromDotNet] (https://localhost:7131/_framework/blazor.webassembly.js:1:62569)
          at Object.Ii (https://localhost:7131/_framework/dotnet..zr9go7vxvc.js:5:71974)
          at _mono_wasm_invoke_js_blazor (https://localhost:7131/_framework/dotnet..zr9go7vxvc.js:6077:71)
          at do_icall (wasm://wasm/0334fa86:wasm-function[3646]:0xc6f3b)
          at do_icall_wrapper (wasm://wasm/0334fa86:wasm-function[3593]:0xc5e37)
          at interp_exec_method (wasm://wasm/0334fa86:wasm-function[3522]:0xb6a22)
Microsoft.JSInterop.JSException: $ is not a function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant