I am trying to load an XML file using Angular and typescript and then be able to extract some specific node values to use them into calculations and display these in other some component of the app. I am completely new to Angular and typescript (and coding in general). I have done the Angular tutorial but now I am struggling to get started and achieve the objective stated above. I think I need to: - Provide the file path and load the file, and store it in a variable - Convert from XML to something else (JSON?) - Look for a certain "node" based on names and attributes and store value in a variable - Use this variable in the HTML using {{}}.
I tried several options but none worked so far probably because I am mixing different routes.
All I have for now is:
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
template: (.... some html.... that displays title and the image below and the date using {{}} )
export class AppComponent {
title="Welcome !";
Welcome_Image="/Images/Images.JPG";
today=Date.now();
}
Could you please help me get started with the task described above ? Thanks a lot for your help.
Best regards, Laurence