You should probably use the injector factory capabilities for this kind of thing - if you try to inject a cookie instance using the injector this will never be called.