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.

Error on adding component to an element

See original GitHub issue

Hi This line of code throws an exception

[Inject]
private MauiBlazorBindingsRenderer Renderer { get; set; }

    protected override async void OnAfterRender(bool firstRender)
    {
        if (firstRender is true)
        {
            ContentPage page = new() { Title = "Ref" };
            await Renderer.AddComponent<MainPage>(page); //Error here
        }
    }

Exception is image

MainPage is a ContentView I tried to make it a ContentPage but it throws the same error I tried this on windows & android

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Dreamescapercommented, Oct 29, 2022

Bugfix was merged, and will be released soon (-ish), therefore I’m closing this item. If you’d like, you can check it out in the nightly builds (read here).

0reactions
Dreamescapercommented, Oct 10, 2022

FlyoutMenuPage and FlyoutMenuItem are parts of that same sample https://github.com/Dreamescaper/BlazorBindings.Maui/tree/main/samples/FlyoutPageSample/Views

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 2 'component' is not a known element
I'm trying to use a component I created inside the AppModule in other modules. I get the following error though: "Uncaught (in promise):...
Read more >
NG8001: Unknown HTML element or component
Make sure that the component is correctly imported inside your NgModule or standalone component, by checking its presence in the imports field.
Read more >
Angular Basics: Troubleshooting Unknown Element Errors
The “Angular error NG8001: Unknown HTML element or component” error is a run-time error that occurs when the Angular compiler encounters an ...
Read more >
An error occurred while adding an instance of this component
Today I've tried to drag and drop the component as usual from the Assets panel but there is an error message for some...
Read more >
Angular Error NG8001: is not a known element ... - YouTube
Angular Error : is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
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