File tree 1 file changed +19
-21
lines changed
1 file changed +19
-21
lines changed Original file line number Diff line number Diff line change 12
12
* The main purpose of this service is to simplify debugging and troubleshooting.
13
13
*
14
14
* @example
15
- <doc:example>
16
- <doc:source>
17
- <script>
18
- function LogCtrl($log) {
19
- this.$log = $log;
20
- this.message = 'Hello World!';
21
- }
22
- </script>
23
- <div ng-controller="LogCtrl">
24
- <p>Reload this page with open console, enter text and hit the log button...</p>
25
- Message:
26
- <input type="text" ng-model="message"/>
27
- <button ng-click="$log.log(message)">log</button>
28
- <button ng-click="$log.warn(message)">warn</button>
29
- <button ng-click="$log.info(message)">info</button>
30
- <button ng-click="$log.error(message)">error</button>
31
- </div>
32
- </doc:source>
33
- <doc:scenario>
34
- </doc:scenario>
35
- </doc:example>
15
+ <example>
16
+ <file name="script.js">
17
+ function LogCtrl($scope, $log) {
18
+ $scope.$log = $log;
19
+ $scope.message = 'Hello World!';
20
+ }
21
+ </file>
22
+ <file name="index.html">
23
+ <div ng-controller="LogCtrl">
24
+ <p>Reload this page with open console, enter text and hit the log button...</p>
25
+ Message:
26
+ <input type="text" ng-model="message"/>
27
+ <button ng-click="$log.log(message)">log</button>
28
+ <button ng-click="$log.warn(message)">warn</button>
29
+ <button ng-click="$log.info(message)">info</button>
30
+ <button ng-click="$log.error(message)">error</button>
31
+ </div>
32
+ </file>
33
+ </example>
36
34
*/
37
35
38
36
function $LogProvider ( ) {
You can’t perform that action at this time.
0 commit comments