Menu icon Foundation
Animation with custom controller doesn't work

Thanks guys for your amazing work on the framework. now, how to make the page animation work when using a custom controller?

---
name: about
url: /about
controller: AboutCtrl
animationIn: slideInDown
---
            

         

animationfoundation-appsAngularJScustom-controller

Thanks guys for your amazing work on the framework. now, how to make the page animation work when using a custom controller?

---
name: about
url: /about
controller: AboutCtrl
animationIn: slideInDown
---
            

         
LuminusDev almost 5 years ago

Related with https://github.com/zurb/foundation-apps/issues/368
Here my answer :

I try using my own controller too, and I extend my controller with DefaultController used by Foundation. Everything seems to work.
How I create my controller :

 angular.module('application')
    .controller('RandomController', RandomController)
;

RandomController.$inject = ['$scope', '$stateParams', '$state', '$controller'];

function RandomController($scope, $stateParams, $state, $controller) {

    angular.extend(this, $controller('DefaultController', {$scope: $scope, $stateParams: $stateParams, $state: $state}));
    // what you want now...
}