How to check if a component exists (inside another component)?

Hi,

I posted a question on stackoverflow and I thought it may be interesting to post it here. It is related to the container.resolve deprecation in ember 1.11: