PageRenderTime 34ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/app/public/js/libs/angular/docs/partials/api/angular.equals.html

https://bitbucket.org/kaiquewdev/front-in-sampa-example
HTML | 33 lines | 29 code | 4 blank | 0 comment | 0 complexity | b77c03575abce374f47a871a318dd433 MD5 | raw file
  1. <h1><code ng:non-bindable="">angular.equals</code>
  2. <span class="hint">(API in module <code ng:non-bindable="">ng</code>
  3. )</span>
  4. </h1>
  5. <div><h2 id="Description">Description</h2>
  6. <div class="description"><p>Determines if two objects or two values are equivalent. Supports value types, arrays and
  7. objects.</p>
  8. <p>Two objects or values are considered equivalent if at least one of the following is true:</p>
  9. <ul>
  10. <li>Both objects or values pass <code>===</code> comparison.</li>
  11. <li>Both objects or values are of the same type and all of their properties pass <code>===</code> comparison.</li>
  12. <li>Both values are NaN. (In JavasScript, NaN == NaN => false. But we consider two NaN as equal)</li>
  13. </ul>
  14. <p>During a property comparision, properties of <code>function</code> type and properties with names
  15. that begin with <code>$</code> are ignored.</p>
  16. <p>Scope and DOMWindow objects are being compared only be identify (<code>===</code>).</p></div>
  17. <h2 id="Usage">Usage</h2>
  18. <div class="usage"><pre class="prettyprint linenums">angular.equals(o1, o2);</pre>
  19. <h3 id="Parameters">Parameters</h3>
  20. <ul class="parameters"><li><code ng:non-bindable="">o1 {*} </code>
  21. <p>Object or value to compare.</p></li>
  22. <li><code ng:non-bindable="">o2 {*} </code>
  23. <p>Object or value to compare.</p></li>
  24. </ul>
  25. <h3 id="Returns">Returns</h3>
  26. <div class="returns"><code ng:non-bindable="">{boolean}</code>
  27. <p>True if arguments are equal.</p></div>
  28. </div>
  29. </div>