Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

angular input

@Component({
  selector: 'bank-account',
  template: `
    Bank Name: {{bankName}}
    Account Id: {{id}}
  `
})
class BankAccount {
  // This property is bound using its original name.
  @Input() bankName: string;
  // this property value is bound to a different property name
  // when this component is instantiated in a template.
  @Input('account-id') id: string;

  // this property is not bound, and is not automatically updated by Angular
  normalizedBankName: string;
}

@Component({
  selector: 'app',
  template: `
    <bank-account bankName="RBC" account-id="4747"></bank-account>
  `
})
class App {}
Comment

@input in angular

@Input() and @Output() give a child component a way to communicate 
with its parent component.

@Input() lets a parent component update data in the child component. 
@Output() lets the child send data to a parent component.

// Please click source link for more details
Comment

PREVIOUS NEXT
Code Example
Javascript :: js string to blob 
Javascript :: how to get the difference between two arrays in javascript 
Javascript :: nodejs sql syntax 
Javascript :: typeof date 
Javascript :: vue router transition 
Javascript :: JQuery datatable with ajax, post API call hook 
Javascript :: make 2div in row react js 
Javascript :: array destructuring js 
Javascript :: function prototype in javascript 
Javascript :: splice method in javascript 
Javascript :: complete ajax request jquery php call | ajax request 
Javascript :: typeof in js 
Javascript :: flatlist only rendering 10 items 
Javascript :: check if element with class has another class javascript 
Javascript :: react native style variable 
Javascript :: instanceof javascript 
Javascript :: import an image react in the public folder 
Javascript :: firebase functions add to database 
Javascript :: if js 
Javascript :: stripe angular 
Javascript :: reverse array elements in javascript 
Javascript :: js array.some 
Javascript :: kafka nodejs example 
Javascript :: show image javascript 
Javascript :: js concat 
Javascript :: regex look behind 
Javascript :: push in object javascript 
Javascript :: import javascript 
Javascript :: parsedate javascript 
Javascript :: javascript ajax get 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =