0

Just a quick question. Suppose I obtain values for var name and size in html <script> tag like this example, how can I pass them to angularJS controller?

Many Thanks.

1 Answer 1

1

So This is NOT an elegant solution but you can use it as a global variable but you can do

window.myVar = varinScript;

and in the controller use/asign the window.myVar to a controller variable

Hope it helps

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.