forked from angular/code.angularjs.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathangular.service.$log.html
46 lines (45 loc) · 1.66 KB
/
angular.service.$log.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<h1>angular.service.$log</h1>
<div class="angular-service-log"><fieldset class="workInProgress"><legend>Work in Progress</legend>
This page is currently being revised. It might be incomplete or contain inaccuracies.</fieldset>
<h2>Description</h2>
<div class="description"><p>Simple service for logging. Default implementation writes the message
into the browser's console (if present).</p>
<p>The main purpose of this service is to simplify debugging and troubleshooting.</p></div>
<h2>Dependencies</h2>
<ul class="dependencies"><li>$window</li>
</ul>
<h2>Methods</h2>
<ul class="methods"><li><h3>error()</h3>
<div class="error-"><p>Write an error message</p><h4>Parameters</h4>
<ul class="parameters"></ul>
</div>
</li>
<li><h3>info()</h3>
<div class="info-"><p>Write an information message</p><h4>Parameters</h4>
<ul class="parameters"></ul>
</div>
</li>
<li><h3>log()</h3>
<div class="log-"><p>Write a log message</p><h4>Parameters</h4>
<ul class="parameters"></ul>
</div>
</li>
<li><h3>warn()</h3>
<div class="warn-"><p>Write a warning message</p><h4>Parameters</h4>
<ul class="parameters"></ul>
</div>
</li>
</ul>
<h2>Properties</h2>
<ul class="properties"></ul>
<h2>Example</h2>
<div class="example"><doc:example><doc:source><p>Reload this page with open console, enter text and hit the log button...</p>
Message:
<input type="text" name="message" value="Hello World!"/>
<button ng:click="$log.log(message)">log</button>
<button ng:click="$log.warn(message)">warn</button>
<button ng:click="$log.info(message)">info</button>
<button ng:click="$log.error(message)">error</button></doc:source>
</doc:example>
</div>
</div>