TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mohan Arumugam
NA
465
37.3k
Angular text box value
May 4 2018 3:44 AM
HOME.COMPONENT.HTML
<div class="AddItem">
<input #inputBox1 placeholder="Add Item" class="addtext">
<button (click) = "pushItem(inputBox1.value)">ADD</button>
</div>
<ul>
<li *ngFor="let i of items>
{{i}}
<span>x</span>
</li>
</ul>
HOME.COMPONENT.TS
export class HomeComponent implements OnInit {
items = ["angular","react","HTML"]
pushItem = function(value){
this.items.push(value);
}
I am new to Angular
After button clicked values are be listed correctly.
but
I need textbox be empty again.
Reply
Answers (
3
)
Angular error "cannot find module '@angular-devkit/core"
Unable to get Id by routing in Angular 4