diff options
| author | Misko Hevery | 2012-06-12 10:01:43 -0700 | 
|---|---|---|
| committer | Misko Hevery | 2012-08-27 21:20:51 -0700 | 
| commit | 300c5c0c99eb65fb9052e64bf86d00c0aa7988df (patch) | |
| tree | 1618e3a3b85e67681989db1b99513986583e928c /src/ng | |
| parent | 152537c4e939baefa516c507c33fcc753c20b934 (diff) | |
| download | angular.js-300c5c0c99eb65fb9052e64bf86d00c0aa7988df.tar.bz2 | |
doc($log): correct non-working example
Diffstat (limited to 'src/ng')
| -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(){  | 
