0

I currently have this, but I am unable to say concatenate a variable in the middle.

var popoverElement = angular.element('<div class="myPopover hide"> [need my variable here] </div>');

4
  • 1
    I would question why you need to do this in the first place but you probably just want to use concatenation Commented Apr 28, 2015 at 14:15
  • I have a use-case, was using angular.translate and got the value via promise. Commented Apr 28, 2015 at 14:16
  • variable value or binded variable? Commented Apr 28, 2015 at 14:28
  • do you want scope variable there? Commented Apr 28, 2015 at 15:24

1 Answer 1

2

String concatenation:

var popoverElement = angular.element('<div class="myPopover hide">' + var + '</div>');
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.