Skip to content

Commit 9f5550e

Browse files
gkalpakclydin
authored andcommitted
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).
1 parent 177fa0d commit 9f5550e

File tree

1 file changed

+2
-2
lines changed
  • packages/angular/cli/src/commands/doc

1 file changed

+2
-2
lines changed

packages/angular/cli/src/commands/doc/cli.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ export class DocCommandModule
8383

8484
await open(
8585
options.search
86-
? `https://${domain}/api?query=${options.keyword}`
87-
: `https://${domain}/docs?search=${options.keyword}`,
86+
? `https://${domain}/docs?search=${options.keyword}`
87+
: `https://${domain}/api?query=${options.keyword}`,
8888
);
8989
}
9090
}

0 commit comments

Comments
 (0)