Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Angula--I have this code working properly but I need to get it print in the console every time Update the FIle ? Code: Index.Html :

Angula--I have this code working properly but I need to get it print in the console every time Update the FIle ?

Code:

Index.Html : Add bootstrap file path

EmployeeList

employee.component.html

Employee Id First Name Last Name Department City Email Edit Update

employee.component.ts

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

import { EmployeeData } from './employee'

@Component({

selector: 'app-employee',

templateUrl: './employee.component.html',

styleUrls: ['./employee.component.css']

})

export class EmployeeComponent implements OnInit {

enable : null;

employeeData : EmployeeData[] = [{

'employee_Id' : 1,

'first_Name' : 'john',

'last_Name' : 'robort',

'department' : 'Banking',

'city' : 'Delhi',

'email' : 'john.robort@gm@il.com'

},

{

'employee_Id' : 2,

'first_Name' : 'nick',

'last_Name' : 'fury',

'department' : 'Manager',

'city' : 'Hydrabad',

'email' : 'nick.fury@gm@il.com'

}];

constructor() { }

ngOnInit(): void {

}

editEmployee(indexValue){

this.enable = indexValue;

}

updateEmployee(indexValue,employee){

this.employeeData[indexValue].employee_Id = employee.employee_Id;

this.employeeData[indexValue].first_Name = employee.first_Name;

this.employeeData[indexValue].last_Name = employee.last_Name;

this.employeeData[indexValue].department = employee.department;

this.employeeData[indexValue].city = employee.city;

this.employeeData[indexValue].email = employee.email;

this.enable = null;

}

}

employee.ts

export interface EmployeeData{

employee_Id : number;

first_Name : string;

last_Name : string;

department : string;

city : string;

email : string;

}

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

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

More Books

Students also viewed these Databases questions

Question

Devise a synthesis of CH2CH2NH2 from CH2Br

Answered: 1 week ago

Question

Describe the advantages of effective listening.

Answered: 1 week ago

Question

When is it appropriate to use a root cause analysis

Answered: 1 week ago

Question

Are these written ground rules?

Answered: 1 week ago

Question

How do members envision the ideal team?

Answered: 1 week ago

Question

Has the team been empowered to prioritize the issues?

Answered: 1 week ago