Skip to main content

One way binding in Angular

One way binding in angular is used set or get the data from html controls, here lets see how to get the value from Textbox on button click and show the same in some span.





import { Component} from '@angular/core';
@Component({
  selector: 'app-root',
  styleUrls: ['./app.component.css'],
  template: ``
})
export class AppComponent {
  userEneteredText :string;

  showData(value :string){
    this.userEneteredText=value;
  }
}



Comments

  1. This is an unprecedented article, Given such a great deal of information in it, I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts.
    Game Toon Cup 2017 Break The Cup For boy best game Battle for the Galaxy

    ReplyDelete

Post a Comment