prefer setTimeout outside the directive.

Close #232