hocvietcode.com
  • Trang chủ
  • Học lập trình
    • Lập trình C/C++
    • Lập trình HTML
    • Lập trình Javascript
      • Javascript cơ bản
      • ReactJS framework
      • AngularJS framework
      • Typescript cơ bản
      • Angular
    • Lập trình Mobile
      • Lập Trình Dart Cơ Bản
        • Dart Flutter Framework
    • Cơ sở dữ liệu
      • MySQL – MariaDB
      • Micrsoft SQL Server
      • Extensible Markup Language (XML)
      • JSON
    • Lập trình PHP
      • Lập trình PHP cơ bản
      • Laravel Framework
    • Lập trình Java
      • Java Cơ bản
    • Cấu trúc dữ liệu và giải thuật
    • Lập Trình C# Cơ Bản
    • Machine Learning
  • WORDPRESS
    • WordPress cơ bản
    • WordPress nâng cao
    • Chia sẻ WordPress
  • Kiến thức hệ thống
    • Microsoft Azure
    • Docker
    • Linux
  • Chia sẻ IT
    • Tin học văn phòng
      • Microsoft Word
      • Microsoft Excel
    • Marketing
      • Google Adwords
      • Facebook Ads
      • Kiến thức khác
    • Chia sẻ phần mềm
    • Review công nghệ
    • Công cụ – tiện ích
      • Kiểm tra bàn phím online
      • Kiểm tra webcam online
Đăng nhập
  • Đăng nhập / Đăng ký

Please enter key search to display results.

Home
  • AngularJS
Animation trong angularJS

Animation trong angularJS

  • 26-04-2022
  • Toanngo92
  • 0 Comments

Animation cung cấp giải pháp để đối tượng chuyển động trong angularJS, giúp tăng trải nghiệm người dùng cho ứng dụng, giúp ứng dụng mượt mà hơn

$ngAnimate

Các bước để bắt đầu sử dụng ngAnimate trong angularJS: tích hợp thư viện angulare-animate.js vào dự án trước khi sử dụng và đưa đối tượng ngAnimate và tham số trong mảng khi khởi tạo ứng dụng ( dependency injection ). Xem ví dụ phía dưới để hiểu cách sử dụng ngAnimate.

Lưu ý: ngAnimate chỉ hoạt động trên phiên bản ổn định 1.2.32 , không hoạt động ở phiên bản mới nhất

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Example animation</title>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.32/angular.min.js"></script>
    <script src="https://code.angularjs.org/1.2.32/angular-animate.min.js"></script>
    <style>
        div {
            transition: all linear 0.5s;
            background-color: cyan;
            height: 100px;
            width: 100%;
            position: relative;
            top: 0px;
            left: 0px;
        }

        .ng-hide {
            height: 0px;
            width: 0px;
            background-color: transparent;
            top: -200px;
            left: 200px;
        }
    </style>
</head>

<body ng-app="myApp" ng-controller="myController">
    <h2>hide the DIV: <input type="checkbox" ng-model="myModel" /></h2>
    <div ng-hide="myModel"></div>
</body>
<script>
    var app = angular.module('myApp', ['ngAnimate']);
    app.controller('myController', function ($scope) {
        $scope.myModel = false;
    });
</script>
</html>

Bài viết liên quan:

Factory và Service trong angularJS
Cơ chế dependency Injection (cơ chế tiêm phụ thuộc) trong angularJS
Form validation trong angularJS
Route (định tuyến) trong angularJS
Filter (bộ lọc) trong angularJS
Service trong AngularJS và các service giao tiếp với máy chủ
Scope và rootScope trong AngularJS
Directive (chỉ thị) trong angularJS và danh sách các directive
Event handling (xử lý xự kiện) trong angularJS
Cơ chế Data binding trong AngularJS
Expressions (biểu thức) trong AngularJS
Views trong AngularJS

THÊM BÌNH LUẬN Cancel reply

Dịch vụ thiết kế Wesbite

NỘI DUNG MỚI CẬP NHẬT

2. PHÂN TÍCH VÀ ĐẶC TẢ HỆ THỐNG

1. TỔNG QUAN KIẾN THỨC THỰC HÀNH TRIỂN KHAI DỰ ÁN CÔNG NGHỆ THÔNG TIN

Hướng dẫn tự cài đặt n8n comunity trên CyberPanel, trỏ tên miền

Mẫu prompt tạo mô tả chi tiết bối cảnh

Một số cải tiến trong ASP.NET Core, Razor Page, Model Binding, Gabbage collection

Giới thiệu

hocvietcode.com là website chia sẻ và cập nhật tin tức công nghệ, chia sẻ kiến thức, kỹ năng. Chúng tôi rất cảm ơn và mong muốn nhận được nhiều phản hồi để có thể phục vụ quý bạn đọc tốt hơn !

Liên hệ quảng cáo: [email protected]

Kết nối với HỌC VIẾT CODE

© hocvietcode.com - Tech888 Co .Ltd since 2019

Đăng nhập

Trở thành một phần của cộng đồng của chúng tôi!
Registration complete. Please check your email.
Đăng nhập bằng google
Đăng kýBạn quên mật khẩu?

Create an account

Welcome! Register for an account
The user name or email address is not correct.
Registration confirmation will be emailed to you.
Log in Lost your password?

Reset password

Recover your password
Password reset email has been sent.
The email could not be sent. Possible reason: your host may have disabled the mail function.
A password will be e-mailed to you.
Log in Register
×