Instruction: Explain how the $q service is used for promise-based asynchronous programming in AngularJS.
Context: This question assesses the candidate's knowledge of handling asynchronous operations in AngularJS applications using promises.
easy
medium