Answers for "angular inout"

3

settimeout in angular

// var that = this;                             // no need of this line
this.messageSuccess = true;

setTimeout(()=>{                           //<<<---using ()=> syntax
      this.messageSuccess = false;
 }, 3000);
Posted by: Guest on September-19-2020
0

input set variable angular

@Component({
    selector: 'my-component',
    template: '<h3> My component </h3>'
})

export class MyComponent {
    @Input()
    set name(str: string) {
        this.service.setName(str);
        console.log(str);
    }
}
Posted by: Guest on July-01-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language