refactor to directive, inherits from parent scope.