angularjs - ngSticky directive for angular with tables -
i using ngsticky directive (https://github.com/d-oliveros/ngsticky) because want fix thead of table when offset=50. width of thead changed when offser=50. correct vision of table:
and get:
th , tr have different width!
my code table is:
<div class="table-responsive"> <table class="table table-condensed persist-area"> <thead sticky offset="50"> <tr class="info">
finally use directive cmelo.angularsticky: https://github.com/cmelo/angular-sticky works me.
install bower: bower install cmelo-angular-sticky
include js file:
<script src="../bower_components/cmelo-angular-sticky/cmelo-sticky.js"></script>
add module dependency:
angular.module('destinator', ['cmelo.angularsticky'])
add cmelo-sticky body:
<body cmelo-sticky>
add cmelo-sticky-top thead:
<thead cmelo-sticky-top>
Comments
Post a Comment