-1

I'm new to AngularJS. I've heard more than 100 times that I must not use controller to manipulate DOM. I know it's about flexibility but, I want to see some examples. Does DOM manipulation include value change in VIEW? Please explain in easy way.

KimCrab
  • 2,231
  • 4
  • 15
  • 20
  • 1
    If you've heard '100 times that you must not use controller to manipulate DOM', why are asking how to do it? It should not be done. DOM manipulation should be done with directives. – Tony Barnes Jul 03 '15 at 12:10
  • @TonyBarnes OK, I will not use controllers to manipulate DOM. So, Show me the example of DOM manipulation by controller. That was my question. – KimCrab Jul 03 '15 at 12:12
  • What? If you're not going to use controllers to manipulate DOM, why do you want an example?! I think you need to research angular DOM manipulation. There are plenty of resources out there. – Tony Barnes Jul 03 '15 at 12:24

1 Answers1

0

In yesterday I help someone that want to do DOM manipulation in controller, you can take a look at this thread: Insert directive into the DOM using jqlite

Community
  • 1
  • 1
Johnny Ha
  • 633
  • 5
  • 21