TutorialLesson 16Free preview
AngularJS DOM
This lesson is part of AngularJS · All levels
Summary
AngularJS provides directives to control DOM displays such as ng-show, ng-hide, ng-if, ng-class, and ng-style. Unlike manual DOM manipulation with jQuery, you're pretty much bound conditions to the directory attribute. It makes the appearance more declarative and easier to maintain.
Key points
- Ng-show and ng-hide control visibility via CSS
- Ng-if deletes or adds elements to the DOM
- Ng-class adds/deletes CSS class conditionally
- Ng-style binds dynamic style objects to elements
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.