Check $$phase on root scope

This fixes #26