我下面這個https://github.com/rpocklin/angular-scroll-animate但我在控制檯得到一個錯誤:指令:屬性必須指定一個功能
Error: Directive: angular-scroll-animate 'when-visible' attribute must specify a function.
的index.html
<section ng-controller="Section1Controller" >
<div class="container" when-visible="animateElementIn" when-not-visible="animateElementOut" class="hidden">
<h3 class="section-title">{{titresection}}</h3>
<div class="line-section"></div>
<div class="section-thumb"><img ng-src="../assets/images/avatar.jpg">
<p class="section-contenue">{{paragraphe}}</p>
</div>
</div>
</section>
controller.html
apps.controller('Section1Controller', function ($scope) {
$scope.titresection="Développeur frontend & backend";
$scope.image='../assets/images/avatar.jpg';
$scope.lefttitle=" 2016";
$scope.paragraphe="éveloppeur frontend, qui développe des sites vitrines sous WordPress et des dernières techniques web : HTML5/CSS3, jQuery, jQuery UI,NodeJs,AngularJs.";
$scope.animateElementIn = function($el) {
$el.removeClass('hidden');
$el.addClass('animated fadeInUp'); // this example leverages animate.css classes
};
$scope.animateElementOut = function($el) {
$el.addClass('hidden');
$el.removeClass('animated fadeInUp'); // this example leverages animate.css classes
};
/*
});
你看該項目的[問題日誌](https://github.com/rpocklin /角滾動動畫/問題/ 7)? – JDB