1

I am trying to dynamically set the elementID for a element within a directive and initiate a jquery plugin "charCount".

http://plnkr.co/edit/XkUCJvhM9Fh2JIz7vwc1?p=preview

I can't find the element within the directive.

Am I approaching this correctly?

1 Answer 1

1

It was mainly a timing issue. By injecting $timeout, it gives directive enough time to render its template in the dom. Here's the updated plunker.

Plunker

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.