little trick for working in angular

something like: 

app.directive('onepagescroll', function () {
  return {
      restrict: 'AC',
      link: function (scope, element, attrs) {
          element.onepage_scroll({
            loop: false,   
            pagination: false,
            beforeMove: function(index) {
              videoplay(index);
            }
          },element);
          $("body").addClass('intro');
      }
  };
});