Grid is finally working, link function in popin_directive so much better