EVOLUTION-MANAGER
Edit File: angular.equals.html
<a href='https://github.com/angular/angular.js/edit/v1.3.x/src/Angular.js?message=docs(angular.equals)%3A%20describe%20your%20change...#L807' class='improve-docs btn btn-primary'><i class="glyphicon glyphicon-edit"> </i>Improve this Doc</a> <a href='https://github.com/angular/angular.js/tree/v1.3.9/src/Angular.js#L807' class='view-source pull-right btn btn-primary'> <i class="glyphicon glyphicon-zoom-in"> </i>View Source </a> <header class="api-profile-header"> <h1 class="api-profile-header-heading">angular.equals</h1> <ol class="api-profile-header-structure naked-list step-list"> <li> - function in module <a href="api/ng">ng</a> </li> </ol> </header> <div class="api-profile-description"> <p>Determines if two objects or two values are equivalent. Supports value types, regular expressions, arrays and objects.</p> <p>Two objects or values are considered equivalent if at least one of the following is true:</p> <ul> <li>Both objects or values pass <code>===</code> comparison.</li> <li>Both objects or values are of the same type and all of their properties are equal by comparing them with <code>angular.equals</code>.</li> <li>Both values are NaN. (In JavaScript, NaN == NaN => false. But we consider two NaN as equal)</li> <li>Both values represent the same regular expression (In JavaScript, /abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual representation matches).</li> </ul> <p>During a property comparison, properties of <code>function</code> type and properties with names that begin with <code>$</code> are ignored.</p> <p>Scope and DOMWindow objects are being compared only by identify (<code>===</code>).</p> </div> <div> <h2 id="usage">Usage</h2> <p><code>angular.equals(o1, o2);</code></p> <section class="api-section"> <h3>Arguments</h3> <table class="variables-matrix input-arguments"> <thead> <tr> <th>Param</th> <th>Type</th> <th>Details</th> </tr> </thead> <tbody> <tr> <td> o1 </td> <td> <a href="" class="label type-hint type-hint-object">*</a> </td> <td> <p>Object or value to compare.</p> </td> </tr> <tr> <td> o2 </td> <td> <a href="" class="label type-hint type-hint-object">*</a> </td> <td> <p>Object or value to compare.</p> </td> </tr> </tbody> </table> </section> <h3>Returns</h3> <table class="variables-matrix return-arguments"> <tr> <td><a href="" class="label type-hint type-hint-boolean">boolean</a></td> <td><p>True if arguments are equal.</p> </td> </tr> </table> </div>