ekokotov / object-table

Angular directive to easy create dynamic tables from source or URL with sorting, filtering and pagination. Smart templates and good perfomance
BSD 3-Clause "New" or "Revised" License
171 stars 52 forks source link

Duplicate tbody when minified #16

Closed langerc closed 8 years ago

langerc commented 9 years ago

hi

i experience a cracy situation - on my development envirenoment everything is fine but if i run it with gulp serve:dist and the minified version is created the tbody is always added twice so the table has twice as many rows as nessessary.

any idea?

ekokotov commented 9 years ago

Are u using the last version ? Or last release version?

langerc commented 9 years ago

my bower file says 0.1.6 do i have to switch to the github verison without using bower?

Am 21.07.2015 um 11:11 schrieb Evgeny Kokotov notifications@github.com:

Are u using the last version ? Or last release version?

— Reply to this email directly or view it on GitHub https://github.com/ekokotov/object-table/issues/16#issuecomment-123227456.

ekokotov commented 9 years ago

langerc, yes. Try please with the last version. It's interesting behaviour.

langerc commented 9 years ago

hi

i tried with the latest version - the tbody element and all its content is added twice after minification with gulp serve-dist

this does not happen if you run with gulp serve - the unminified version

strange but .. true

thank you christoph

Am 21.07.2015 um 15:16 schrieb Evgeny Kokotov notifications@github.com:

langerc, yes. Try please with the last version. It's interesting behaviour.

— Reply to this email directly or view it on GitHub https://github.com/ekokotov/object-table/issues/16#issuecomment-123301349.

ekokotov commented 9 years ago

show me please your HTML markup. I'll try to reproduce this strange thing.

ekokotov commented 9 years ago

I tried with the last version (builded using my internal gulp task - run 'gulp build' from main library directory). And everything is fine. Show me your HTML markup and your 'gulp serve-dist' task.

langerc commented 9 years ago

im working on it - its not so easy cause the project has several thousand lines - will try to do a plunkr - but this will take some days cause i have to travel to the austrian nationals in skydiving.

this is the code i use in the template, i just copied one of your examples. pendingJournals is an array, source is restangular. Maybe that helps

<table object-table class="poli" data="pendingJournals" display="5" headers="Customer,Amount,Author" fields="lastname,firstname,amount,author" sorting="false" search="false" paging="true">

{{::item.lastname}} {{::item.firstname}} {{::item.amount | number:2}} {{::item.author}}

have a nice day christoph

Am 28.07.2015 um 14:01 schrieb Evgeny Kokotov notifications@github.com:

I tried with the last version (builded using my internal gulp task - run 'gulp build' from main library directory). And everything is fine. Show me your HTML markup and your 'gulp serve-dist' task.

— Reply to this email directly or view it on GitHub https://github.com/ekokotov/object-table/issues/16#issuecomment-125574749.

langerc commented 9 years ago

How to reproduce the Probelm use this as base, its some simple steps and you get an empty project with everything you need (well most of it) https://github.com/Swiip/generator-gulp-angular

then add the above table to the main.controller.js below activate

vm.pendingJournals = [{"id":11,"lastname":"firstname","firstname":"lastname","amount":10.0,"author":"web"}, {"id":12,"lastname":"firstname1","firstname":"lastname1","amount":20.0,"author":"web"}];

add a table with tbody to main.html <table object-table class="poli" data="main.pendingJournals" display="5" headers="Customer,Amount,Author" fields="lastname, firstname,amount,author" sorting="false" search="false" paging="true">

{{::item.lastname}} {{::item.firstname}} {{::item.amount | number:2}} {{::item.author}}

run gulp serve:dist

you will see 4 lines instead of 2. if you run gulp serve - everything is fine.

ekokotov commented 9 years ago

It's crazy. I can't reproduce your issue. image and run "gulp serve:dist" result is: image

P.S. I've installed angular-object-table using bower. @version v0.1.8

langerc commented 9 years ago

well i tried 0.1.8 and 0.1.9

never mind i will replace the table module with another one since i cant spend more time on that issue ..

but you did not use the full framework you wrote your own html - i think it has something to do with the templating and minimzing of them.

if you dont mind try to fill in the structure i sent you in the main.html template without adding a body - it will use the ui-router template and all the stuff then,

have a nice day christoph

Am 12.08.2015 um 16:51 schrieb Evgeny Kokotov notifications@github.com:

It's crazy. I can't reproduce your issue. https://cloud.githubusercontent.com/assets/11966000/9227099/bac19a46-40c6-11e5-9569-d54416608871.png and run "gulp serve:dist" result is: https://cloud.githubusercontent.com/assets/11966000/9227120/d592f388-40c6-11e5-8b40-7d7c893d40f6.png P.S. I've installed angular-object-table using bower. @version https://github.com/version v0.1.8

— Reply to this email directly or view it on GitHub https://github.com/ekokotov/object-table/issues/16#issuecomment-130329844.

ekokotov commented 9 years ago

I've used your structure: