From 281ddc3f98faa67fbbf955d4a64460ebe37f25ce Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Wed, 18 May 2022 13:57:28 +0300 Subject: [PATCH] fix(@angular/cli): correctly handle `--search` option in `ng doc` When the `--search` option is passed to `ng doc`, it should open a URL that does a search across the whole website (instead of the default behavior of limiting the search to API docs). Fix the `ng doc` command to implement the iteded behavior (previously, it did the opposite). --- packages/angular/cli/src/commands/doc/cli.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/angular/cli/src/commands/doc/cli.ts b/packages/angular/cli/src/commands/doc/cli.ts index 067f487dcbd8..73b7826fc066 100644 --- a/packages/angular/cli/src/commands/doc/cli.ts +++ b/packages/angular/cli/src/commands/doc/cli.ts @@ -83,8 +83,8 @@ export class DocCommandModule await open( options.search - ? `https://${domain}/api?query=${options.keyword}` - : `https://${domain}/docs?search=${options.keyword}`, + ? `https://${domain}/docs?search=${options.keyword}` + : `https://${domain}/api?query=${options.keyword}`, ); } }