What parts of functionality should be refactored into a directive?

Posted by Sprottenwels on Programmers See other posts from Programmers or by Sprottenwels
Published on 2013-11-12T13:28:52Z Indexed on 2013/11/12 22:03 UTC
Read the original article Hit count: 198

I am creating an application from legacy code using AngularJS.

I wonder what parts of my code should be moved into a directive.

For example, iI had thought of moving a table which is used multiple times across the application into a directive. The tables alter from headings and size.

Is it worth the effort or even a good practice to turn such things into their own directives or should I create each table in a unique way?

© Programmers or respective owner

Related posts about JavaScript

Related posts about architecture