0

Is it good or bad to use many custom directive for DOM manipulation in Angular js. from reading Angularjs.org I came to know that the best way to manipulate DOM is through custom directive in Angular js. But what if I want to manipulate many DOM Elements I have to create many custom directive I don't know whether it is good or bad practice. Does many custom directive cause any delay in functionality. Please help me out

Kavin Java
  • 61
  • 1
  • 9
  • sounds like XY problem – smnbbrv Mar 29 '16 at 07:06
  • Possible duplicate of [How does data binding work in AngularJS?](http://stackoverflow.com/questions/9682092/how-does-data-binding-work-in-angularjs) – Khalid Hussain Mar 29 '16 at 07:50
  • [Have a look at the answer provided by the creator of AngularJS](http://stackoverflow.com/a/9693933/3186722). He has discussed about data binding as well as performance in his answer. – Khalid Hussain Mar 29 '16 at 07:53

2 Answers2

0

Custom Directives never create problem.In fact it solves the problem of delay in functionality.I would recommend you to use in build directives and in case if you want you can create Custom Directive. It will not create any problem for your application.

Dss
  • 33
  • 7
0

Actually one of the reasons to use directives is DOM manipulation. You can also keep your controllers clean and reuse HTML. Normally, applications that requires a lot of user experiences (through DOM manipulations) also requires reusable directives.

Regards

cnexans
  • 975
  • 1
  • 7
  • 20