Angular learning added the directive and promises.