Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
docs(angular.module): simplify wording
A suggestion on the wording of retrieving a moudle
  • Loading branch information
frankadrian committed Aug 10, 2015
commit 207858e41e377c452a74843ee3693faf4a16eacd
2 changes: 1 addition & 1 deletion src/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function setupModuleLoader(window) {
* registered using this mechanism.
*
* When passed two or more arguments, a new module is created. If passed only one argument, an
* existing module (the name passed as the first argument to `module`) is retrieved.
* existing module of that name is retrieved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that this is concise --- but how about we make it clear that we're talking about a specific parameter, and maybe just reword the paragraph entirely, because it wasn't particularly well written to begin with. It sounds sort of Yoda-ish, you know? (Referring especially to the preceding "When passed two or more arguments, a new module created is." bit), and just doesn't come across as particularly natural.

Something more like "Creates a new {@link angular.Module} when passed more than one argument, or retrieves an existing {@link angular.Module} when only passed a single argument.", maybe? It's not perfect, but sounds slightly less weird to me.

If we're going to mention "name" at all, lets wrap it in codeblocks (surround with backticks) to hint that it refers to a parameter. And, if we aren't going to mention the position in the list, maybe at least refer to it as "the name argument" or something.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes i like that! How about:
"Passing one argument retrieves an existing {@link angular.Module}, whereas passing more than one argument creates a new {@link angular.Module}"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that sounds good to me! --- Minor nit, comma before "while" --- and you might consider replacing "while" with "whereas", but I'll leave that up to you

*
*
* # Module
Expand Down