Guest User

Untitled

a guest
Oct 17th, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. Uncaught (in promise): Error: If ngModel is used within a form tag, either the name attribute must be set or the form
  2. control must be defined as 'standalone' in ngModelOptions.
  3.  
  4. Example 1: <input [(ngModel)]="person.firstName" name="first">
  5. Example 2: <input [(ngModel)]="person.firstName" [ngModelOptions]="{standalone: true}">
  6. Error: If ngModel is used within a form tag, either the name attribute must be set or the form
  7. control must be defined as 'standalone' in ngModelOptions.
  8.  
  9. Example 1: <input [(ngModel)]="person.firstName" name="first">
  10. Example 2: <input [(ngModel)]="person.firstName" [ngModelOptions]="{standalone: true}">
  11. at Function.TemplateDrivenErrors.missingNameException (http://localhost:8100/build/vendor.js:26062:15)
  12. at NgModel._checkName (http://localhost:8100/build/vendor.js:26380:34)
  13. at NgModel._checkForErrors (http://localhost:8100/build/vendor.js:26359:14)
  14. at NgModel.ngOnChanges (http://localhost:8100/build/vendor.js:26264:14)
  15. at checkAndUpdateDirectiveInline (http://localhost:8100/build/vendor.js:11210:19)
  16. at checkAndUpdateNodeInline (http://localhost:8100/build/vendor.js:12714:17)
  17. at checkAndUpdateNode (http://localhost:8100/build/vendor.js:12653:16)
  18. at debugCheckAndUpdateNode (http://localhost:8100/build/vendor.js:13517:59)
  19. at debugCheckDirectivesFn (http://localhost:8100/build/vendor.js:13458:13)
  20. at Object.eval [as updateDirectives] (ng:///AppModule/RegistroPage.ngfactory.js:234:5)
  21.  
  22. <ion-input type="text" [(ngModel)]="nombreApellidos" ></ion-input>
  23.  
  24. import { Component } from '@angular/core';
  25. import { IonicPage, NavController, NavParams } from 'ionic-angular';
  26.  
  27. @IonicPage()
  28. @Component({
  29. selector: 'page-registro',
  30. templateUrl: 'registro.html',
  31. })
  32. export class RegistroPage {
  33.  
  34. nombreApellidos: string;
  35.  
  36. constructor(public navCtrl: NavController, public navParams: NavParams) {
  37. }
  38. }
Add Comment
Please, Sign In to add comment