Skip to content
New issue

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

Parameter 'x' implicitly has an 'any' type after adding ng2-formly modules #323

Closed
hassanthegooner opened this issue Dec 9, 2016 · 1 comment · Fixed by #327
Closed

Comments

@hassanthegooner
Copy link

hassanthegooner commented Dec 9, 2016

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
@mohammedzamakhan
Copy link
Contributor

change tsconfig.json file

    "noImplicitAny": false,

and add

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

to systemjs.config.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants