0

I'm generating a dynamic number of Google Charts tables after receiving the content through an ajax request and I wanted to apply an accordion effect on them. I wanted to know if I could do that with directives (since if I just code render the angular tags they won't get interpreted).

I don't need a code example, just a short answer to see if I should learn directives or if I should do it in a different way (I was thinking routeParams).

Thanks!

1 Answer 1

1

A directive is an equivalent of a jquery plugin, it should be use when you want to create a widget which manages some user interactions or a specific templating.

In your case it's a great idea, the directive could call a service which shall return the server datas and could manage all user interactions like open and close the accordion.

Before all, think about reusability.

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.