How to run typescript with IntelliJ to view results

Asked 2 years ago, Updated 2 years ago, 62 views

Hello, I started to do typescript while studying angular.

I'm working on IntelliJ.

Is there a way to run the typescript file that I created?

The example is now available in the browser.

import { Component } from '@angular/core';

@Component({
  selector: 'app-hello',
  template: `
    <h1>{{title}}</h1>
    <input type="text" [(ngModel)]="title">
    <textarea [(ngModel)]="title"></textarea>`,
    styles : [`input,textarea{margin-top:20px;display:block;}`]
})
export class HelloComponent {
  title = 'Hello Component';  
}

I don't know how to run this.

intellij-idea typescript javascript angular

2022-09-22 20:07

1 Answers

Self-answer..

The example itself was not a program that was processed only by typescript ;

;;

I haven't figured it out yet because I'm seeing it for the first time today.

However, the common typescript is in the command window

tsc {type script file} // After compiling
node {compiled JavaScript file} // Run

I can do it.

Thank you.


2022-09-22 20:07

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.