achieve data-binding function

the directive require ng-model now, actually, ng-model should pass in a boolean variable