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

FormlyForm directive is error. #83

Closed
manxiaoboo opened this issue Aug 19, 2016 · 2 comments
Closed

FormlyForm directive is error. #83

manxiaoboo opened this issue Aug 19, 2016 · 2 comments

Comments

@manxiaoboo
Copy link

manxiaoboo commented Aug 19, 2016

I use 'npm install ng2-formly --save' to add it in my project.
Then do this:

import {Component} from '@angular/core';
import {FormlyForm, FormlyConfig, FormlyMessages, TemplateDirectives, FormlyProviders,FormlyPubSub,Field,FormlyBootstrap} from 'ng2-formly';

@Component({
    selector: 'appform-app',
    template: `
        <h1>Formly</h1>
    `,
    directives: [FormlyForm],
    providers: [FormlyConfig, FormlyMessages]
})
export class ApplicationForm{
    constructor() {}
}

But the program is not run .
The Error is : Unexpected directive value 'undefined' on the View of component 'ApplicationForm'.

Then I start create a "empty project", do it again. It's not run.
The Error is : Uncaught (in promise): No Directive annotation found on FormlyForm.

This is my part of package.json:
```
"@angular/common": "2.0.0-rc.5",
"@angular/compiler": "2.0.0-rc.5",
"@angular/core": "2.0.0-rc.5",
"@angular/forms": "0.3.0",
"@angular/http": "2.0.0-rc.5",
"@angular/platform-browser": "2.0.0-rc.5",
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
"@angular/router": "3.0.0-rc.1",
"@angular/router-deprecated": "2.0.0-rc.2",
"@angular/upgrade": "2.0.0-rc.5",
"angular2-in-memory-web-api": "0.0.15",
"bootstrap": "^3.3.6",
"breeze-bridge-angular2": "^0.1.0",
"breeze-client": "^1.5.8",
"core-js": "^2.4.0",
"ng2-formly": "^2.0.0-beta.5",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"systemjs": "0.19.27",
"webpack": "^1.13.2",
"zone.js": "^0.6.12"

@ultimafirez
Copy link

I'm not sure if this solution would apply to everyone, but when I was getting this error, I went to the node_modules folder in the ng2-formly folder and deleted the "@angular" folder. Seemed to work for me.

@manxiaoboo
Copy link
Author

done. I copy the code to my project, it's working. but use npm install, it's error.

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

No branches or pull requests

2 participants