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
  2. Success is failure turned inside out - The silver tint in the clouds of doubt, and you never can tell how close you are, it might be near when it seems afar; So stick to the fight when you're hardest hit - It's when things seem worst that you must not quit.
    kizi 2 player racing games
    Jogo para criança
    play friv Games

    ReplyDelete

Post a Comment