use es6 Promises in directives