Skip to content

Commit

Permalink
fix(@angular/cli): correctly handle --search option in ng doc
Browse files Browse the repository at this point in the history
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).

(cherry picked from commit 9f5550e)
  • Loading branch information
gkalpak authored and clydin committed May 18, 2022
1 parent db0cb55 commit 160cb07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/angular/cli/src/commands/doc/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`,
);
}
}

0 comments on commit 160cb07

Please sign in to comment.