knowhow-server
Version:
A personal workflow engine that can manage and use any network connected host
13 lines (12 loc) • 1.81 kB
HTML
<a href="http://github.com/angular/angular.js/tree/v1.2.9/src/ngMock/angular-mocks.js#L1721" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ngMock/angular-mocks.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable=""></code>
<div><span class="hint"></span>
</div>
</h1>
<div><div class="ngmock-page"><h2 id="ngmock">ngMock</h2>
<p>The <code>ngMock</code> module providers support to inject and mock Angular services into unit tests.
In addition, ngMock also extends various core ng services such that they can be
inspected and controlled in a synchronous manner within test code.</p>
<p><h2 id="installation">Installation</h2><p>First include <code>angular-mocks.js</code> in your HTML:</p><pre><code> <script src="angular.js">
<script src="angular-mocks.js"></pre></code><p>You can download this file from the following places:</p><ul><li><a href="https://developers.google.com/speed/libraries/devguide#angularjs">Google CDN</a><br>e.g. <code>"//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-mocks.js"</code></li><li><a href="http://bower.io">Bower</a><br>e.g. <code>bower install angular-mocks@X.Y.Z</code></li><li><a href="http://code.angularjs.org/">code.angularjs.org</a><br>e.g. <code>"//code.angularjs.org/X.Y.Z/angular-mocks.js"</code></li></ul><p>where X.Y.Z is the AngularJS version you are running.</p><p>Then load the module in your application by adding it as a dependent module:</p><pre><code> angular.module('app', ['ngMocks']);</pre></code><p>With that you're ready to get started!</p></p>
<div doc-module-components="ngMock">
</div></div></div>