Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #102953
    Rafa Esparza
    Participant

    Hi,

    I’m using angular and i’m trying to create a window putting inside a custom component with tabs. The problem appears when i switch the tab because the content of non active tab is not loaded.

    How could i load the full component when the window is opened?

    Following snippet it has the methods create window and load the custom component that i tried to use it.

    createWindow(): void {
    const newWindow = document.createElement(‘smart-window’),
    windowCount = document.getElementsByTagName(‘smart-window’).length;

    newWindow.id = newWindow.label = ‘Window ‘ + (windowCount + 1);
    newWindow[‘content’] = this.loadComponent();
    newWindow.opened = true;
    document.body.appendChild(newWindow);
    }

    loadComponent(): any {
    const container = document.createElement(‘div’);
    let component = this.service.loadComponent(EjemploITPComponent, container);
    let inst = (component.componentRef.instance as EjemploITPComponent);
    return component.domElement<
    }

    Thanks in advance

    • This topic was modified 2 years, 4 months ago by Rafa Esparza. Reason: uncomplete
    • This topic was modified 2 years, 4 months ago by Rafa Esparza.
    #102956
    martin-jq
    Participant

    Hello Rafa,

    Are you using Smart.Tabs inside the window? How do you load the content of the tabs?
    Usually, the html content of all tabs is loaded. If necessary, you can iterate through the tabs using the select method.
    Here is an Example.

    Best Regards,
    Martin

    Smart HTMLElements Team
    https://www.htmlelements.com/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.