Fixed angular module when used into a custom directive. Do not rely on the $$phase variable anymore.