Skip to content

Instantly share code, notes, and snippets.

@bjoerntx

bjoerntx/test.ts Secret

Created July 10, 2023 08:02
Show Gist options
  • Save bjoerntx/0b274b3b351ecc3d9bb2ae81f8753727 to your computer and use it in GitHub Desktop.
Save bjoerntx/0b274b3b351ecc3d9bb2ae81f8753727 to your computer and use it in GitHub Desktop.
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