digipolisantwerp / antwerp-ui_angular

Antwerp UI is a component interface library for building user interfaces and responsive web apps.
https://digipolisantwerp.github.io/antwerp-ui_angular
MIT License
13 stars 19 forks source link

error importing AutoCompleteModule with ng serve --aot #57

Closed jsebrech closed 5 years ago

jsebrech commented 6 years ago

Describe the bug

When importing the autocomplete component in a project that uses the --aot flag for ng serve the following error is produced:

ERROR in : Unexpected value 'AutoCompleteModule 
in C:/digipolis/prototypes/my-app/node_modules/@acpaas-ui/ngx-components/forms/forms.d.ts' 
imported by the module 'AppModule in C:/digipolis/prototypes/my-app/src/app/app.module.ts'. 
Please add a @NgModule annotation.

To Reproduce

Steps to reproduce the behavior:

  1. Follow the getting started instructions to create a new project
  2. Import AutoCompleteModule in app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AutoCompleteModule} from '@acpaas-ui/ngx-components/forms';
import { AppComponent } from './app.component';
@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    AutoCompleteModule
  ],
  1. Add <aui-auto-complete> to app.component.html as per the example
  2. Run ng serve --aot
  3. See the error

Expected behavior

ng serve --aot flag should be supported

jsebrech commented 6 years ago

Problem also appears with other components and with the styleguide.

gerturo commented 6 years ago

Welke andere componenten hebben nog dit probleem?

jsebrech commented 6 years ago

Bij FooterModule kreeg ik een andere foutmelding (bij het binnentrekken in de app.module.ts):

ERROR in ./src/app/app.module.ngfactory.js
Module not found: Error: Can't resolve 'layout' in 'C:\digipolis\prototypes\my-app\src\app'

Bij AvatarModule was er een analoge foutmelding als FooterModule. Ik vermoed dus dat het voor alle componenten is.