Access a localhost running in Windows from inside WSL2? [closed]

Short answer for most recent Windows versions mDNS has been a feature of WSL2 for a while now. Concatenating your WSL2 hostname (or the equivalent command/function in your programming/language environment) with “.local” should get you access. For example, from Bash, try: ping “$(hostname).local” For instance, if your hostname is “MyComputer”, then the mDNS should be … Read more

Dynamically load HTML template in angular2

You could use [innerHtml] in a my-template component with something like this (I didn’t test) : @Component({ selector: ‘my-template’, template: ` <div [innerHtml]=”myTemplate”> </div> `}) export public class MyTemplate { private myTemplate: any = “”; @Input() url: string; constructor(http: Http) { http.get(“/path-to-your-jsp”).map((html:any) => this.myTemplate = html); } }