如何在Ionic 3 App中安装ng2-validation

时间:2017-09-15 11:10:21

标签: validation ionic-framework ionic2

我尝试在Ionic 3 App中添加ng2-validation。 它使用

成功安装
  

npm install ng2-validation --save

Package.json 依赖项

  "dependencies": {
        "@angular/common": "4.1.3",
        "@angular/compiler": "4.1.3",
        "@angular/compiler-cli": "4.1.3",
        "@angular/core": "4.1.3",
        "@angular/forms": "4.1.3",
        "@angular/http": "4.1.3",
        "@angular/platform-browser": "4.1.3",
        "@angular/platform-browser-dynamic": "4.1.3",
        "@ionic-native/admob-pro": "^4.1.0",
        "@ionic-native/android-permissions": "^4.1.0",
        "@ionic-native/app-version": "^4.1.0",
        "@ionic-native/camera": "^4.1.0",
        "@ionic-native/core": "3.12.1",
        "@ionic-native/device": "^4.1.0",
        "@ionic-native/device-accounts": "^4.2.1",
        "@ionic-native/dialogs": "^4.1.0",
        "@ionic-native/email-composer": "^4.1.0",
        "@ionic-native/in-app-browser": "^4.1.0",
        "@ionic-native/insomnia": "^4.2.1",
        "@ionic-native/market": "^4.2.1",
        "@ionic-native/network": "^4.1.0",
        "@ionic-native/push": "^4.2.1",
        "@ionic-native/social-sharing": "^4.1.0",
        "@ionic-native/splash-screen": "3.12.1",
        "@ionic-native/status-bar": "3.12.1",
        "@ionic-native/themeable-browser": "^4.1.0",
        "@ionic-native/toast": "^4.1.0",
        "@ionic/storage": "^2.0.1",
        "com.danielsogl.cordova.deviceaccounts": "~1.0.0",
        "cordova-android": "^6.2.3",
        "cordova-device-accounts": "^1.0.0",
        "cordova-plugin-admobpro": "^2.29.21",
        "cordova-plugin-android-permissions": "^1.0.0",
        "cordova-plugin-app-version": "^0.1.9",
        "cordova-plugin-camera": "^2.4.1",
        "cordova-plugin-compat": "^1.1.0",
        "cordova-plugin-console": "^1.0.5",
        "cordova-plugin-device": "^1.1.4",
        "cordova-plugin-dialogs": "^1.3.3",
        "cordova-plugin-email-composer": "^0.8.7",
        "cordova-plugin-extension": "^1.5.1",
        "cordova-plugin-inappbrowser": "^1.7.1",
        "cordova-plugin-insomnia": "^4.3.0",
        "cordova-plugin-market": "^1.2.0",
        "cordova-plugin-network-information": "^1.3.3",
        "cordova-plugin-splashscreen": "^4.0.3",
        "cordova-plugin-statusbar": "^2.2.2",
        "cordova-plugin-themeablebrowser": "^0.2.17",
        "cordova-plugin-whitelist": "^1.3.1",
        "cordova-plugin-x-socialsharing": "^5.2.0",
        "cordova-plugin-x-toast": "^2.6.0",
        "cordova-sqlite-storage": "^2.0.4",
        "es6-promise-plugin": "^4.1.0",
        "ionic-angular": "3.6.0",
        "ionic-plugin-keyboard": "^2.2.1",
        "ionicons": "3.0.0",
        "ng2-validation": "^4.2.0",
        "phonegap-plugin-push": "^2.0.0",
        "rxjs": "5.4.0",
        "sw-toolbox": "3.6.0",
        "zone.js": "0.8.12"
    },

但在那之后我收到了一个错误:

未捕获错误:意外的模块' CustomFormsModule'由模块' AppModule'声明。请添加@ Pipe / @ Directive / @组件注释。

请帮我解决这个问题

0 个答案:

没有答案