How to display or hide the animation effect in AngularJS _ AngularJS

Source: Internet
Author: User
Tags cloudflare
AngularJS is a set of rich frameworks used to create single-page Web applications. It provides all functions for building rich interactive applications. one of the main features is Angular's support for animation. The following section describes how to display or hide the animation effect in AngularJS, interested in angularjs animation effects, learning AngularJS together is a set of rich frameworks used to create single-page Web applications. it brings all the required functions to build rich interactive applications. One of the main features is Angular's support for animation.

This article describes how to add an animation effect between the "show/hide" status switches in AngularJS.

Display/hide animation effects using CSS

Ideas:

→ Npm install angular-animage
→ Dependency: var app = angular. module ("app", ["ngAnimate"]);
→ A variable in the controller receives the bool value
→ A button is provided on the interface, and you can click to change the bool value.
→ Ng-if and bool value binding are provided for the display/hidden areas on the interface.

App. js

var app = angular.module("app",["ngAnimate"]);app.controller("AppCtrl", function(){ this.toggle = true;})

Index.html

 
   
  
 Toggle Animation

Some content here

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.