Search code examples
javascriptangularjsng-animate

ngRoute no longer working after injecting ngAnimate


I wanted to animate my application so I injected ngAnimate but now none of my views are displaying:

var spApp = angular.module('spApp', ['ngRoute','ui.bootstrap', 'ngAnimate'])
    .config(function($routeProvider, $locationProvider){
        var rootUrl = '/Style%20Library/projects/spDash/app/partials/';
        $routeProvider
        .when('/home', 
        {
            templateUrl: rootUrl+'home.html'
        })
        .when('/userView', 
        {
            templateUrl: rootUrl+'userView.html', 
            controller: 'userCtrl'
        })
        .when('/groupView', 
        {
            templateUrl: rootUrl+'groupsView.html', 
            controller: 'groupCtrl' 
        })
        .when('/sitesView',
        {
            templateUrl: rootUrl+'sitesview.html',
            controller: 'sitesCtrl'
        })
        .otherwise({redirectTo:'/home'});
        //$locationProvider.html5Mode(true);
    });

Is this incorrect?


Solution

  • The version between angular and animate weren't the same. Angular was 1.2.4 while animate was 1.2.10.

    Upgrading angular solved the issue.

    Thanks for trying.