We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Describe the bug Flowbite isn't initialized immediately after saving app.component.html, and a browser reload is required for it to work.
To Reproduce Steps to reproduce the behavior:
Expected behavior Flowbite should initialize automatically, and the modal should work without needing to reload the browser.
//! app/services/flowbite.service.ts import { Injectable, Inject, PLATFORM_ID } from '@angular/core'; import { isPlatformBrowser } from '@angular/common'; @Injectable({ providedIn: 'root' }) export class FlowbiteService { constructor(@Inject(PLATFORM_ID) private platformId: any) { } loadFlowbite(callback: (flowbite: any) => void) { if (isPlatformBrowser(this.platformId)) { import('flowbite').then(flowbite => { callback(flowbite); }); } } }
//! /Users/developer/angular-project/ngdashboard/src/app/app.component.ts import { Component, OnInit } from '@angular/core'; import { RouterOutlet } from '@angular/router'; import { FlowbiteService } from './services/flowbite.service'; import { initFlowbite } from 'flowbite'; @Component({ selector: 'app-root', imports: [RouterOutlet], templateUrl: './app.component.html', styleUrl: './app.component.css' }) export class AppComponent implements OnInit { title = 'ngdashboard'; constructor(private flowbiteService: FlowbiteService) { } ngOnInit(): void { this.flowbiteService.loadFlowbite((flowbite) => { initFlowbite(); }); } }
/Users/developer/angular-project/ngdashboard/src/styles.css @import "tailwindcss"; @import "flowbite/src/themes/default"; /* @plugin "flowbite/plugin"; */ @source "../node_modules/flowbite";
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
Flowbite isn't initialized immediately after saving app.component.html, and a browser reload is required for it to work.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Flowbite should initialize automatically, and the modal should work without needing to reload the browser.
The text was updated successfully, but these errors were encountered: