pass container conditionally from rootscope