reload a child component in angular
import { Component, Input, OnChanges } from "@angular/core";
@Component({
selector: "child-component",
templateUrl: "./child-component.html"
})
export class MyComponent implements OnChanges {
@Input() someInput: string;
constructor() {}
ngOnChanges() {
/**********THIS FUNCTION WILL TRIGGER WHEN PARENT COMPONENT UPDATES 'someInput'**************/
//Write your code here
console.log(this.someInput);
}
}
<child-component [someInput]="inputValue"></child-component>
Also in JavaScript:
- how to check palindrome in javascript for lowercase and uppercase
- javascript replace all with variable
- page is loading from previous page scroll in reactjs
- duplicate encoder
- js how to hide an image
- javascript remove from array by index
- jquery clear html
- next.js google script
- créer composant react
- mandelbrot generating code
- generate random number nodejs
- move file from one folder to another in aws s3 nodejs
- ajouter javascript dans html
- create a html table dynamically using javascript
- objeto con método javascript
- esql convert blob to json
- creating a 2d array in js
- react disable eslint errors
- how to make lines glow canvas
- how to reload a page in javascript
- Javascript modify URL without reload
- create a slider
- jquery watch checkbox change
- Caesars Cipher javascript