【问题标题】:How to add bootstrap forms in angular 2 with validation support?如何在具有验证支持的角度 2 中添加引导表单?
【发布时间】:2016-12-07 09:42:17
【问题描述】:

我已尝试创建如下链接中给出的表单:

https://angular.io/docs/ts/latest/guide/forms.html

在上面的链接中,请查看引导主题。

我已经导入了如下代码示例的表单

   import { bootstrap } from '@angular/platform-browser-dynamic';
   import { disableDeprecatedForms, provideForms } from '@angular/forms';

   bootstrap(AppComponent, [
   disableDeprecatedForms(),
   provideForms()
   ])

但网页在导入表单时会在页面中抛出 404 found issue。

 http://localhost:3000/node_modules/@angular/platform-browser-dynamic/platform-browser-dynamic.umd.js 

 Failed to load resource: the server responded with a status of 404 (Not Found)

  http://localhost:3000/node_modules/@angular/forms/forms.umd.js Failed to    load resource: the server responded with a status of 404 (Not Found)

我正在使用 Angular 1.0.0 rc.1 更新。您能否请任何人建议使用这些新表单,使用我当前的版本进行引导,因为升级到另一个版本可能需要对我的应用程序进行更多更改。

【问题讨论】:

  • 更新到 RC4 版本。
  • 我想用我当前的版本这可能吗?

标签: javascript typescript angular packages angular2-forms


【解决方案1】:

我检查了更多。但唯一的解决方案是更新到 RC4 版本,因为表单支持仅来自 rc2。所以我升级了我的应用程序 谢谢

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-08-06
    • 2021-11-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-11-25
    • 1970-01-01
    • 2016-04-06
    相关资源
    最近更新 更多