mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
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:
parent
e0209169bf
commit
5e9835b4f2
2 changed files with 9 additions and 1 deletions
|
|
@ -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>' +
|
||||
' <script src="angular.js">\n' +
|
||||
|
|
|
|||
2
src/ngMock/angular-mocks.js
vendored
2
src/ngMock/angular-mocks.js
vendored
|
|
@ -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>
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue