Click here to Skip to main content
15,867,771 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to link between HTML page and Typescript date time method?
Can i use directly Typescript function at HTML tag?
Posted

1 solution

Short answer is: you add a script written in TypeScript language in exact same way as with JavaScript. For example, look at the HTML sample here: http://www.typescriptlang.org/Tutorial[^].

You need to understand one main thing: browsers don't "know" anything about TypeScript, they can only work with JavaScript. TypeScript code needs to be translated into JavaScript to be used. Please read the whole tutorial referenced above explaining how to make it happen. It won't happen "by default".

Learn more: http://www.typescriptlang.org/Handbook[^].

See also:
https://en.wikipedia.org/wiki/TypeScript[^],
http://go.microsoft.com/fwlink/?LinkId=267121[^],
https://github.com/dzharii/awesome-typescript[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900