K Kartik Sharma 🎓 Tutor III ⭐ 8.30K Points 📊 Angular Q. Which operator shares a single subscription among multiple subscribers? (A) map (B) shareReplay (C) filter (D) delay 👁️ Show Answer 💬 Discuss 🔗 Share ✅ Correct Answer: (B) shareReplay Explanation: shareReplay shares and replays emitted values.
K Kartik Sharma 🎓 Tutor III ⭐ 8.30K Points 📊 Angular Q. Which Angular testing utility creates a test environment? (A) TestBed (B) Jasmine (C) Karma (D) Protractor 👁️ Show Answer 💬 Discuss 🔗 Share ✅ Correct Answer: (A) TestBed Explanation: TestBed configures the Angular testing module.
K Kartik Sharma 🎓 Tutor III ⭐ 8.30K Points 📊 Angular Q. What does the inject() function replace? (A) NgModule (B) Constructor-based dependency injection (C) Services (D) Providers 👁️ Show Answer 💬 Discuss 🔗 Share ✅ Correct Answer: (B) Constructor-based dependency injection Explanation: inject() allows DI without constructors.
K Kartik Sharma 🎓 Tutor III ⭐ 8.30K Points 📊 Angular Q. Which Angular feature enables hydration in SSR? (A) Zone.js (B) TransferState (C) NgModule (D) HttpClient 👁️ Show Answer 💬 Discuss 🔗 Share ✅ Correct Answer: (B) TransferState Explanation: TransferState helps transfer data from server to client.
K Kartik Sharma 🎓 Tutor III ⭐ 8.30K Points 📊 Angular Q. What does the router-outlet directive do? (A) Loads services (B) Acts as placeholder for routed views (C) Handles guards (D) Preloads modules 👁️ Show Answer 💬 Discuss 🔗 Share ✅ Correct Answer: (B) Acts as placeholder for routed views Explanation: router-outlet displays routed components.
K Kartik Sharma 🎓 Tutor III ⭐ 8.30K Points 📊 Angular Q. Which lifecycle hook is called when an input property changes? (A) ngOnInit (B) ngDoCheck (C) ngOnChanges (D) ngAfterViewInit 👁️ Show Answer 💬 Discuss 🔗 Share ✅ Correct Answer: (C) ngOnChanges Explanation: ngOnChanges reacts to @Input() changes.
K Kartik Sharma 🎓 Tutor III ⭐ 8.30K Points 📊 Angular Q. Which operator is used to handle errors in RxJS? (A) catchError (B) throwError (C) retry (D) finalize 👁️ Show Answer 💬 Discuss 🔗 Share ✅ Correct Answer: (A) catchError Explanation: catchError handles observable errors.
K Kartik Sharma 🎓 Tutor III ⭐ 8.30K Points 📊 Angular Q. Which Angular feature supports tree shaking? (A) NgModules (B) providedIn (C) Two-way binding (D) Event emitters 👁️ Show Answer 💬 Discuss 🔗 Share ✅ Correct Answer: (B) providedIn Explanation: providedIn enables tree-shakable providers.
K Kartik Sharma 🎓 Tutor III ⭐ 8.30K Points 📊 Angular Q. Which API is used to dynamically create components? (A) ComponentFactoryResolver (B) Renderer2 (C) ViewEncapsulation (D) TemplateRef 👁️ Show Answer 💬 Discuss 🔗 Share ✅ Correct Answer: (A) ComponentFactoryResolver Explanation: ComponentFactoryResolver dynamically creates components.
K Kartik Sharma 🎓 Tutor III ⭐ 8.30K Points 📊 Angular Q. What is the main purpose of ChangeDetectionStrategy.OnPush? (A) Runs change detection on every event (B) Improves performance by reducing change detection cycles (C) Disables change detection completely (D) Works only with services 👁️ Show Answer 💬 Discuss 🔗 Share ✅ Correct Answer: (B) Improves performance by reducing change detection cycles Explanation: OnPush runs change detection only when input references change or events occur.