Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, I'm working on a page to allow the people to add student name in the textbox and display the name on the table. people

Hello, I'm working on a page to allow the people to add student name in the textbox and display the name on the table. people can add up to 7 names. I store in array and display but the problem is after I display the names on the other column i have to put remove button and when they press the remove button it will remove that name; Unfortunately the remove button isn't working for me now. this page is angular Typescript. NOTE:******Typescript and it not Java Script*******

//This is my code

import { Component, OnInit } from '@angular/core';

@Component({ selector: 'app-names', template: `

Student Names

Student name
{{name}}
`, styles: [] }) export class NamesComponent implements OnInit { studentNames: string[] = []; newName = ''; maxLength = 3;

ngOnInit(): void {

}

addName() { if (this.studentNames.length

//Pictures

image text in transcribed

when the click remove on mike Artete, it should remove only Mike Artete name from the table

\begin{tabular}{||l||l||} \hline \hline \multicolumn{1}{|c||}{ Student name } & \\ \hline \hline Alfreds Futterkiste & Remove \\ \hline Mike Artete & Remove \\ \hline \end{tabular}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Hands On Database

Authors: Steve Conger

1st Edition

013610827X, 978-0136108276

Students also viewed these Databases questions