angular-ui/ui-utils

How to manualy trigger ui-scrollfix

aligin opened this issue · 1 comments

I describe my problem. I'm using ui-router and 2 columns. In the left column I have the list of items, in the right column the is my ui-view with item-details.
So basic item in the left column is:

<div class="left-column">
  <div class="list-group">
      <a class="list-group-item" ui-sref="usersdetail({username: user.userName})" ng-repeat="user in users"></a>
  </div>
</div>
<ui-view>
<!-- right column content from state -->
</ui-view>

The right column card markup has directive 'ui-scrollfix'

<div class="col-sm-7 bootcards-cards" ui-scrollfix>
    <!--contact details -->
</div>

When I scroll by mouse the ui-scrollfix sets class 'ui-scrollfix' properly. When I change the state by clicking on the left item my scroll position doesn't change BUT 'ui-scrollfix' class disappears from right column and I must scroll up or down in order to directive trigger.
So I tried to manually trigger scroll event when state is changed but it has no effect

angular.module('activeContactApp')
.controller('userDetailsController', ['$scope', '$window', function ($scope, $window) {
    angular.element($window).triggerHandler('onScroll');
}

Please help.

UI.Utils modules was split in individuals repositories. If still valid, please consider re-submitting the issue on its dedicated repository: https://github.com/angular-ui/ui-scrollpoint

See the README for details.