Usman lqbal
Usman lqbal

Reputation: 974

Best approach to accomplish

I have following list in which i have applied different filter according to the some business rules and some functions .Every thing is working fine . But Now i wanted to use this same list along with the same filters and functions on different places.Right now all code is written in one single controller.

Now my question is that do i need to convert in a single directive or in service ?

enter image description here

Upvotes: 1

Views: 38

Answers (1)

basarat
basarat

Reputation: 276189

Now my question is that do i need to convert in a single directive or in service

Either choice is fine. I would create a single directive (for use in html) that uses a single service (to control the directive logic).

Upvotes: 1

Related Questions