uses two-way binding for directive