Dear Team,
I have made a service and html file in Angular.
I need to include a checkbox in the table and iterate through the items.
File - p.components.html
Pending Assets
- class="container">
class='table table-striped'>
Computer.ComputerType Model.Brand.Name Model.Name Computer.TcpIpHostName Asset.SerialNo User.UserName RIL_Inventoried_User.UserName Asset.Field1 "let pa of pendingasset"> {{ pa.computerComputerType }} {{ pa.modelBrandName }} {{ pa.modelName }} {{ pa.computerTcpIpHostName }} {{ pa.assetSerialNo }} {{ pa.userUserName }} {{ pa.rIL_Inventoried_UserUserName }} {{ pa.assetField1 }} {{ pa.modelName }}
File - p.component.ts
- import { Component, Inject, OnInit } from '@angular/core';
- import { HttpClient } from '@angular/common/http';
- import xml2js from 'xml2js';
- import { HttpHeaders } from '@angular/common/http';
- import { Observable } from 'rxjs';
- //import { AgGridModule } from "ag-grid-angular/main";
- //import { GridOptions } from "ag-grid/main";
- @Component({
- selector: 'app-pendingassets',
- templateUrl: './pendingassets.component.html'
- //styleUrls: ['./pendingassets.component.css']
- })
- export class PendingAssets {
- public pendingasset: pendassets[];
- constructor(http: HttpClient, @Inject('BASE_URL') baseUrl: string) {
- http.get
(baseUrl + 'api/PendingAssetsAPI').subscribe(result => { - this.pendingasset = result;
- }, error => console.error());
- }
- }
- interface pendassets {
- ComputerComputerType: string;
- ModelBrandName: string;
- ModelName: string;
- ComputerTcpIpHostName: string;
- AssetSerialNo: string;
- UserUserName: string;
- RIL_Inventoried_UserUserName: string;
- AssetField1: string;
- }
Riddhi ValechaPosted Mar 11, 2021, 9:32 AM
Ronika JencyPosted Mar 9, 2021, 4:23 PM
Riddhi ValechaPosted Mar 9, 2021, 3:39 PM
Riddhi ValechaPosted Mar 9, 2021, 8:39 AM
Ronika JencyPosted Mar 9, 2021, 4:23 AM