jquery - `ngAnimate` - integration issue -


i have installed angular using bower. here bower.json

{   "name": "tcp",   "version": "1.0.0",   "dependencies": {     "jquery": "~2.1.4",     "angular": "~1.4.1",     "angular-animate": "~1.4.1"   },   "resolutions": {     "angular": "~1.4.1"   } } 

and initiating angular-animate in app.js this:

(function () {      "user strict";      angular.module("tcpapp", ["ngroute","ngresource", "nganimate"])      .config(function ($routeprovider, $locationprovider) {          $routeprovider             .when ("/", {                 templateurl : "views/login/login.html",                 controller  : "logincontroller",                 classname   : "login"         });          $routeprovider             .when ("/home", {                 templateurl : "views/home/home.html",                 controller  : "homecontroller",                 classname   : "home"         });          $routeprovider             .otherwise ({                 redirectto:'/'         });     })  })(); 

now want fade-in login page while page loads. have applied class name .loginanimate , keeping style in index page, this:

<head>     <meta charset="utf-8">     <meta http-equiv="x-ua-compatible" content="ie=edge">     <base href="/">     <title>tcp app</title>     <link rel="stylesheet" href="css/lib/fonts.css">     <link rel="stylesheet" href="css/lib/reset.css">     <link rel="stylesheet" href="css/tcp.css">     <link rel="stylesheet" href="css/config.css">     <link rel="stylesheet" media="screen , (min-width: 768px)"  href="css/mobile768.css">     <link rel="stylesheet" media="screen , (max-width: 320px)"  href="css/mobile320.css">      <style>          .loginanimate{ transition: 0.5s ease; }          .loginanimate.ng-enter {             opacity: 0;         }          .loginanimate.ng-enter.ng-enter-active {             opacity: 1;         }      </style>  </head> <body ng-controller="maincontroller" ng-class="routeclassname">      <div class="wrapper">         <div class="loginanimate" ng-class="pageclass" ng-view></div>         <body-footer></body-footer>     </div>      <!--libs -->     <script src="js/lib/jquery/dist/jquery.min.js"></script>     <script src="js/lib/angular/angular.min.js"></script>     <script src="js/lib/angular-resource/angular-resource.min.js"></script>     <script src="js/lib/angular-route/angular-route.min.js"></script>     <script src="js/lib/angular-animate/angular-animate.min.js"></script>     <!--scripts -->     <script src="app.js"></script>     <script src="js/script/directives/footer/dirfooter.js"></script>     <script src="js/script/factory/server.js"></script>     <script src="js/script/controllers/main/maincontroller.js"></script>     <script src="js/script/controllers/login/logincontroller.js"></script>     <script src="js/script/directives/header/dirheader.js"></script>     <script src="js/script/controllers/home/homecontroller.js"></script>     <script src="js/script/directives/home/dirhome.js"></script> </body> </html> 

but animation not working @ all. , not getting ng-active class name in ng-view. 1 me solve issue please?

i removed <body-footer></body-footer> adjust of ng-view , added login.html page. works me.

should not add adjacent ng-view ?

before:

<div class="wrapper">         <div class="loginanimate" ng-class="pageclass" ng-view></div>         <body-footer></body-footer> //removed     </div> 

now wrapper this:

<div class="wrapper">         <div ng-class="pageclass" ng-view></div> </div> 

Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -