sort out $parent scope issue with repeated model