Angular2 two-way binding error?

app.component.ts

 
import { Component } from "@angular/core";

@Component({
  selector: "app-root",
  templateUrl: "./app.component.html",
  styleUrls: ["./app.component.css"]
})
export class AppComponent {
  title = "app";
  
  stock = ""

}

app.component.html

<h1></h1>
<div></div>
<div>
    <input type="text" placeholder="" [(ngModel)]="stock">
    <app-order [stockCode]="stock" [amount]="100"></app-order>
</div>

order.component.ts

import { Component, OnInit, Input} from "@angular/core";

@Component({
  selector: "app-order",
  templateUrl: "./order.component.html",
  styleUrls: ["./order.component.css"]
})
export class OrderComponent implements OnInit {
  
  @Input()
  stockCode:string;

  @Input()
  amount: number

  constructor() { }

  ngOnInit() {
  }

}

order.component.html

<div>
  
</div>
<div>
  {{amount}}{{stockCode}}
</div>   

clipboard.png

Feb.28,2021

introduce FormsModule into imports in module


whether FormsModule is not introduced into module

import { FormsModule } from '@angular/forms';
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3069c-2bd03.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3069c-2bd03.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?