Last active
April 17, 2019 10:41
-
-
Save alemohamad/5f75aabfb81e9b471f4b2a9dd4652565 to your computer and use it in GitHub Desktop.
Angular 7 component with ngModel data binding.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>{{ title }}</h1> | |
<input type="text" [(ngModel)]="title"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
@Component({ | |
selector: 'app-contact', | |
templateUrl: './contact.component.html', | |
styleUrls: ['./contact.component.scss'] | |
}) | |
export class ContactComponent implements OnInit { | |
title = 'Contact section'; | |
constructor() { } | |
ngOnInit() { } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment