aboutsummaryrefslogtreecommitdiffstats
path: root/docs/src/ngdoc.js
diff options
context:
space:
mode:
authorPeter Bacon Darwin2014-01-23 17:26:23 +0000
committerPeter Bacon Darwin2014-01-23 17:27:30 +0000
commit5e9835b4f245346b3c79f5e4927c9accfb57a50d (patch)
treebc38fab4fabcb80c8672d370576a434f5daae42d /docs/src/ngdoc.js
parente0209169bf1463465ad07484421620748a4d3908 (diff)
downloadangular.js-5e9835b4f245346b3c79f5e4927c9accfb57a50d.tar.bz2
docs(ngdoc): ensure module installation docs are accurate
The ngMock module is built into a package called angular-mocks, which is not named consistently and the docs were giving invalid info. Closes #5810
Diffstat (limited to 'docs/src/ngdoc.js')
-rw-r--r--docs/src/ngdoc.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/src/ngdoc.js b/docs/src/ngdoc.js
index 77c01b77..83aa992e 100644
--- a/docs/src/ngdoc.js
+++ b/docs/src/ngdoc.js
@@ -1401,6 +1401,14 @@ function explainModuleInstallation(moduleName){
modulePackage = 'angular-' + moduleName,
modulePackageFile = modulePackage + '.js';
+ // Deal with inconsistent ngMock naming - doing it verbosely and explicitly here
+ // rather than cleverly interweaving it in the previous lines to make it obvious
+ // what is going on
+ if ( moduleName == 'mock' ) {
+ modulePackage = 'angular-mocks';
+ modulePackageFile = modulePackage + '.js';
+ }
+
return '<h1>Installation</h1>' +
'<p>First include <code>' + modulePackageFile +'</code> in your HTML:</p><pre><code>' +
' &lt;script src=&quot;angular.js&quot;&gt;\n' +