diff options
| author | Misko Hevery | 2012-06-12 10:01:43 -0700 | 
|---|---|---|
| committer | Misko Hevery | 2012-08-27 15:44:38 -0700 | 
| commit | e8ded01cf5a79aa2aa598670cd3ed88641c2c362 (patch) | |
| tree | 89c0f2c927e1e56d7fdd2b30c4bb494b14949ba6 /src/ng/log.js | |
| parent | 7a5f25f6671eb5f51b06615d74a05855ab79f31e (diff) | |
| download | angular.js-e8ded01cf5a79aa2aa598670cd3ed88641c2c362.tar.bz2 | |
doc($log): correct non-working example
Diffstat (limited to 'src/ng/log.js')
| -rw-r--r-- | src/ng/log.js | 40 | 
1 files changed, 19 insertions, 21 deletions
| diff --git a/src/ng/log.js b/src/ng/log.js index 847d29ae..1b552da8 100644 --- a/src/ng/log.js +++ b/src/ng/log.js @@ -12,27 +12,25 @@   * The main purpose of this service is to simplify debugging and troubleshooting.   *   * @example -    <doc:example> -      <doc:source> -         <script> -           function LogCtrl($log) { -             this.$log = $log; -             this.message = 'Hello World!'; -           } -         </script> -         <div ng-controller="LogCtrl"> -           <p>Reload this page with open console, enter text and hit the log button...</p> -           Message: -           <input type="text" ng-model="message"/> -           <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> -         </div> -      </doc:source> -      <doc:scenario> -      </doc:scenario> -    </doc:example> +   <example> +     <file name="script.js"> +       function LogCtrl($scope, $log) { +         $scope.$log = $log; +         $scope.message = 'Hello World!'; +       } +     </file> +     <file name="index.html"> +       <div ng-controller="LogCtrl"> +         <p>Reload this page with open console, enter text and hit the log button...</p> +         Message: +         <input type="text" ng-model="message"/> +         <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> +       </div> +     </file> +   </example>   */  function $LogProvider(){ | 
