optimized dependency injection for pages