typescript-ruby / typescript-rails

An asset pipeline wrapper for the TypeScript language
MIT License
255 stars 29 forks source link

How to access Instance variables in Typescript file? #52

Open SagareGanesh opened 7 years ago

SagareGanesh commented 7 years ago

I am trying to create a app in Rails with typescript. Now stuck in how to access my instance variables in typescript.

thanks

rodri0315 commented 7 years ago

Have you figure anything out about this, did you get it to work?

loqman commented 7 years ago

Change your file name to script.js.ts.erb and access your instance variable like you do in erb files:

<%= @instance_variable %>