seperate the template from the directive, fixed select all logic