|
|
@@ -7,19 +7,19 @@
|
|
|
scope: {
|
|
|
options: '='
|
|
|
},
|
|
|
- link: function (scope, element, attr) {
|
|
|
+ link: function (scope, $el, attr) {
|
|
|
var tableCreated = false;
|
|
|
scope.$watch('options', function (newValue, oldValue) {
|
|
|
if (tableCreated && newValue === oldValue) return;
|
|
|
- $(element).bootstrapTable('destroy');
|
|
|
+ $el.bootstrapTable('destroy');
|
|
|
if (newValue) {
|
|
|
- $(element).bootstrapTable(scope.options);
|
|
|
+ $el.bootstrapTable(scope.options);
|
|
|
}
|
|
|
tableCreated = typeof (newValue) !== 'undefined';
|
|
|
});
|
|
|
$(window).resize(function () {
|
|
|
if (tableCreated)
|
|
|
- $(element).bootstrapTable('resetView');
|
|
|
+ $el.bootstrapTable('resetView');
|
|
|
})
|
|
|
}
|
|
|
};
|