-
-
Save bjoerntx/0b274b3b351ecc3d9bb2ae81f8753727 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { HttpClient } from '@angular/common/http'; | |
declare const loadDocument: any; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.css'] | |
}) | |
export class AppComponent implements OnInit { | |
title = 'my-editor-app'; | |
webSocketUrl = 'wss://backend.textcontrol.com?access-token=123'; | |
private URL = '../assets/docs/test.tx'; | |
constructor(private httpClient: HttpClient) {} | |
ngOnInit() { | |
this.httpClient.get(this.URL, {responseType:'blob'}).subscribe((response) => { | |
loadDocument(response); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment