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
This commit is contained in:
Peter Bacon Darwin 2014-01-23 17:26:23 +00:00
parent e0209169bf
commit 5e9835b4f2
2 changed files with 9 additions and 1 deletions

View file

@ -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' +

View file

@ -1729,7 +1729,7 @@ angular.mock.$RootElementProvider = function() {
* In addition, ngMock also extends various core ng services such that they can be
* inspected and controlled in a synchronous manner within test code.
*
* {@installModule mocks}
* {@installModule mock}
*
* <div doc-module-components="ngMock"></div>
*