Ngx-formly: Parameter 'x' implicitly has an 'any' type after adding ng2-formly modules

Created on 9 Dec 2016  路  1Comment  路  Source: ngx-formly/ngx-formly

I'm submitting a ...

[x] bug report
[ ] feature request
[ ] support request

Current behavior
_Completely new to ng2-formly and this is my first time submitting an issue so please go easy on me if I've made any mistakes._

After cloning the angular quickstart project, I've followed the instructions to install ng2-formly from the official website. Then I run npm start and I get these errors:

node_modules/ng2-formly/lib/src/core/components/formly.field.config.d.ts(15,43): error TS7006: Parameter 'model' implicitly has an 'any' type. ``node_modules/ng2-formly/lib/src/core/components/formly.field.config.d.ts(15,50): error TS7006: Parameter 'formState' implicitly has an 'any' type.

Expected behavior
Should display formly form like the one that's provided in the ng2-formly website

Minimal reproduction of the problem with instructions

  • Clone and run the Angular 2 quick starter project from here: https://github.com/angular/quickstart
  • Install ng2-formly to project using get started guide: npm install ng2-formly --save
  • In app/app.module.ts file:
import {NgModule} from '@angular/core';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {BrowserModule} from '@angular/platform-browser';
import {FormlyModule, FormlyBootstrapModule} from 'ng2-formly';
import {AppComponent} from './app.component';

@NgModule({
  imports: [
    BrowserModule,
    FormsModule,
    ReactiveFormsModule,
    FormlyModule.forRoot(),
    FormlyBootstrapModule,
  ],
  declarations: [AppComponent],
  bootstrap: [AppComponent]
})
export class AppModule {
}

Please tell us about your environment:
OS X, Node v6.9.2, NPM 4.0.3

  • Angular version: 2.3.0
    _Tried with Angular 2.3.0 and 2.2.0_

Most helpful comment

changetsconfig.json file

    "noImplicitAny": false,

and add

      'ng2-formly': 'npm:ng2-formly/bundles/ng2-formly.umd.js',

to systemjs.config.js

>All comments

changetsconfig.json file

    "noImplicitAny": false,

and add

      'ng2-formly': 'npm:ng2-formly/bundles/ng2-formly.umd.js',

to systemjs.config.js

Was this page helpful?
0 / 5 - 0 ratings