Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to read from asset in angular

private httpClient: HttpClient;

  constructor(http: HttpClient) {
    this.httpClient = http;
  }

this.httpClient.get('assets/Maze1.txt', { responseType: 'text' })
      .subscribe(data => console.log(data));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #read #asset #angular
ADD COMMENT
Topic
Name
8+1 =