TASK 1 | ANGULAR WORLD MAP PROJECT
& WORLD BANK API GUIDE | 2026-2027.
149 Questions with Answers and Detailed Rationales
100 PERCENT GUARANTEED PASS
INSTANT DOWNLOAD ANSWERS INCLUDED
IMPORTANCE OF THIS DOCUMENT
This comprehensive examination preparation guide has been meticulously developed to help you succeed in the
WGU D280 JAVASCRIPT PROGRAMMING TASK 1 | ANGULAR WORLD MAP PROJECT & WORLD BANK API
GUIDE | 2026-2027.. It contains 149 carefully selected questions that reflect the most current exam content and
testing strategies. Each question is accompanied by a correct answer and a detailed rationale that explains the
underlying pathophysiology, pharmacology, or clinical reasoning.
Self-Assessment – Test your knowledge and Exam Preparation – Familiarize yourself with the
identify areas requiring further question format and content
study areas
Concept Reinforcement – Deepen your Confidence Building – Develop test-taking
understanding through strategies and reduce
evidence-based exam anxiety
rationales
Time Management – Practice answering
questions under simulated
exam conditions
Review Summary 149 Questions
Foundations - Application - WGU D280 Javascript Programming TASK 1 Angular World MAP Project &
World BANK API Guide 2026 2027 Javascript Programming Angular DATA Visualization REST APIS
Undergraduate YEAR 3 / Graduate
All answers with rationales
,Table of Contents
Content Area Questions Key Topics
Angular Fundamentals AND 1-25 World, Angular, BANK API, Country, MAP Project
Project Setup
Typescript AND ES6 Syntax 26-50 World, Angular, YOU NEED, Project, BANK API
Components Templates AND 51-75 Angular, World, Country, Component, YOU NEED
DATA Binding
Services AND Dependency 76-100 World, Angular, Country, Component, BANK API
Injection
HTTP Client AND REST API 101-125 World, Angular, YOU NEED, Component, BANK API
Integration
World BANK API DATA 126-149 Angular, World, BANK API, Correctly, RXJS Operator
Retrieval AND Parsing
TOTAL 149 All questions include answers and detailed rationales
,Section A - Angular Fundamentals AND Project Setup
Q1.
In an Angular service that fetches country data from the World Bank API, which RxJS
operator chain correctly transforms the HTTP response to extract the array of country
records and handles errors by returning a fallback empty array?
A. this.http.get(url).pipe(map(res => res[1]), B. this.http.get(url).pipe(map(res => res[1]),
catchError(() => of([]))) catchError(err => throwError(err)))
C. this.http.get(url).pipe(pluck('1'), D. this.http.get(url).pipe(mergeMap(res =>
catchError(() => EMPTY)) res[1]), catchError(() => of([])))
Correct: A - this.http.get(url).pipe(map(res => res[1]), catchError(() => of([])))
Rationale:The World Bank API returns an array where the second element is the actual data
array. Using map to extract index 1 and catchError to return an empty array on error is
correct. Option B rethrows the error, C uses 'pluck' which is deprecated and wrong key, D
uses mergeMap which would flatten the array incorrectly.
Q2.
When using Angular's HttpClient to fetch from the World Bank API, which interceptor
configuration is necessary to prevent CORS issues during development while preserving
production behavior?
A. Configure a proxy in angular.json for B. Set the 'withCredentials' option in
development and use absolute URLs in HttpClient requests to bypass CORS.
production.
C. Disable CORS in the browser using a D. Use JSONP instead of HttpClient for all
Chrome flag and rely on that for all requests since it avoids CORS entirely.
environments.
Correct: A - Configure a proxy in angular.json for development and use absolute URLs in
production.
Rationale:A proxy configuration in angular.json redirects API calls to the target server during
development, avoiding CORS. In production, the app uses the same origin or a properly
configured backend. Option B is incorrect because withCredentials does not bypass CORS; it
only includes credentials. C is not a viable production solution. D is not applicable for GET
requests to World Bank which support CORS.
Q3.
In an Angular application using the World Bank API, you need to display a map with
country polygons colored by GDP per capita. Which approach best optimizes change
detection when updating the map data asynchronously?
Page 3
, Section A - Angular Fundamentals AND Project Setup
A. Mutate the array of country data in place B. Use an RxJS BehaviorSubject to hold the
and trigger a new reference via data and subscribe in the component with
Object.assign. the async pipe.
C. Call NgZone.run() manually after each D. Set ChangeDetectionStrategy.Default
data update to ensure change detection and rely on automatic change detection for
runs. all updates.
Correct: B - Use an RxJS BehaviorSubject to hold the data and subscribe in the
component with the async pipe.
Rationale:Using a BehaviorSubject and the async pipe leverages OnPush change detection
when combined with immutable data updates, minimizing unnecessary checks. Mutating in
place (A) won't trigger OnPush. C is unnecessary and can cause performance issues. D is
less efficient for frequent updates.
Q4.
Given the World Bank API returns an indicator value as a string with possible nulls, which
TypeScript type definition best models the response for a country's GDP data?
A. interface GdpData { country: string; B. interface GdpData { country: string;
value: number | null; year: number; } value: string; year: number; }
C. type GdpData = { country: string; value: D. interface GdpData { country: string;
number; year: number } | null; value: any; year: number; }
Correct: A - interface GdpData { country: string; value: number | null; year: number; }
Rationale:The API returns values that can be null or a numeric string; typing as number | null
is more precise than string or any. Option B is inaccurate because the value is numeric in
nature. C models the entire object as null, not the value. D uses any, which defeats type
safety.
Q5.
When deploying an Angular app that uses the World Bank API, which build-time
configuration is essential to ensure the app works in a subdirectory on a web server?
A. Set the 'baseHref' in angular.json to the B. Use HashLocationStrategy for the router.
subdirectory path.
C. Set 'deployUrl' to the absolute URL of the D. Disable route lazy loading to simplify the
server. build.
Correct: A - Set the 'baseHref' in angular.json to the subdirectory path.
Page 4