Closed g5becks closed 4 years ago
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. To help make it easier for us to investigate your issue, please follow the contributing guidelines.
Hi @g5becks see if you added the imports as described below:
import { NgModule } from '@angular/core';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { AppComponent } from './app.component';
import { HelloComponent } from './hello.component';
import { CoreModule, ButtonGroupModule, ButtonModule, InputModule, ToasterModule } from 'truly-ui';
@NgModule({
imports: [
BrowserAnimationsModule,
BrowserModule,
FormsModule,
ButtonModule,
ButtonGroupModule,
CoreModule.forRoot({theme: 'default'}),
InputModule.forRoot(),
ToasterModule.forRoot(),
],
declarations: [ AppComponent, HelloComponent ],
bootstrap: [ AppComponent ]
})
export class AppModule { }
If the error continues fork the Stackblits project of ours with the modules you are using and try to simulate the error to see what might be happening.
Hi @abalad thanks for the fast response. Here is my full code below.
import { NgModule } from '@angular/core'
import { FormsModule } from '@angular/forms'
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
import { HttpClientModule, HttpClient } from '@angular/common/http'
import { CoreModule } from './core/core.module'
import { SharedModule } from './shared/shared.module'
import { CoreModule as TrulyCore, ButtonGroupModule } from 'truly-ui'
import { AppRoutingModule } from './app-routing.module'
// NG Translate
import { TranslateModule, TranslateLoader } from '@ngx-translate/core'
import { TranslateHttpLoader } from '@ngx-translate/http-loader'
import { HomeModule } from './home/home.module'
import { AppComponent } from './app.component'
// AoT requires an exported function for factories
export function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader {
return new TranslateHttpLoader(http, './assets/i18n/', '.json')
}
@NgModule({
declarations: [AppComponent],
imports: [
BrowserAnimationsModule,
BrowserModule,
FormsModule,
HttpClientModule,
CoreModule,
SharedModule,
HomeModule,
AppRoutingModule,
ButtonGroupModule,
TrulyCore.forRoot({ theme: 'default' }),
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: HttpLoaderFactory,
deps: [HttpClient],
},
}),
],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {}
Just want to update, this is an issue within Webstorm that is causing an issue that does not exist to be reported for some reason.
Thanks for the help.
I am trying to use this library in an electron desktop app using angular 8.2.14
I am following the directions on the homepage of your website for getting started and I am getting the following error after attempting to import any of the modules.
"Class button group module is not an Angular module"
I have tried a few different modules and they all result in the same error being reported.
Can you help me sort this out? Thanks.