Change div content dynamically on other div click (AngularJS)

前端 未结 1 1711
臣服心动
臣服心动 2021-02-20 15:08

So, I\'m new to AngularJS and I\'m trying to change a div content after another is clicked (this one holds a div with the content that I want to put on the first one).

H

相关标签:
1条回答
  • 2021-02-20 15:45

    Setup ng-click:

    ngClick is for doing things such as the scary jQuery-esque stuff you have going on in your change directive. Place ng-click in your clickable div's attributes and pass in a method that changes the $scope variable accepted by...

    ngShow and ngHide.

    When true these directives, as the name states, show or hide the associated html object. You can pass in $scope variables determine the boolean value. When the $scope updates these methods automatically update the DOM to show/hide the element.

    0 讨论(0)
提交回复
热议问题