21.) How can you install a third-party package in an Angular project?
A) ng add package-name
B) npm install package-name
C) Both A and B
D) ng install package-name
22.) How can you create a new Angular service using CLI?
A) ng generate service service-name
B) ng create service service-name
C) ng add service service-name
D) ng new service-name
23.) What is the purpose of polyfills.ts in an Angular project?
A) It provides compatibility with older browsers
B) It handles Angular animations
C) It defines API endpoints
D) It is used for database connectivity
24.) What is the default command to open an Angular project in a browser after serving?
A) npm start
B) ng open
C) ng serve –open
D) ng start
25.) What is the main purpose of an Angular module?
A) To define global CSS styles
B) To group related components, directives, and services
C) To store API response data
D) To manage component lifecycles
Related