Easy peasy flash factory and directive for Angular JS