diff options
Diffstat (limited to 'src/ng/directive/ngBind.js')
| -rw-r--r-- | src/ng/directive/ngBind.js | 36 | 
1 files changed, 21 insertions, 15 deletions
| diff --git a/src/ng/directive/ngBind.js b/src/ng/directive/ngBind.js index 2ba50928..ecfc8ab6 100644 --- a/src/ng/directive/ngBind.js +++ b/src/ng/directive/ngBind.js @@ -138,27 +138,33 @@ var ngBindTemplateDirective = ['$interpolate', function($interpolate) {   * @param {expression} ngBindHtml {@link guide/expression Expression} to evaluate.   *   * @example - * Try it here: enter text in text box and watch the greeting change. -   <doc:example module="ngBindHtmlExample" deps="angular-sanitize.js" > -     <doc:source> -       <script> -         angular.module('ngBindHtmlExample', ['ngSanitize']) - -         .controller('ngBindHtmlCtrl', ['$scope', function ngBindHtmlCtrl($scope) { -           $scope.myHTML = 'I am an <code>HTML</code>string with <a href="#">links!</a> and other <em>stuff</em>'; -         }]); -       </script> +   Try it here: enter text in text box and watch the greeting change. +  +   <example module="ngBindHtmlExample" deps="angular-sanitize.js"> +     <file name="index.html">         <div ng-controller="ngBindHtmlCtrl">          <p ng-bind-html="myHTML"></p>         </div> -     </doc:source> -     <doc:scenario> +     </file> +      +     <file name="script.js"> +       angular.module('ngBindHtmlExample', ['ngSanitize']) + +       .controller('ngBindHtmlCtrl', ['$scope', function ngBindHtmlCtrl($scope) { +         $scope.myHTML = +            'I am an <code>HTML</code>string with <a href="#">links!</a> and other <em>stuff</em>'; +       }]); +     </file> + +     <file name="scenario.js">         it('should check ng-bind-html', function() {           expect(using('.doc-example-live').binding('myHTML')). -           toBe('I am an <code>HTML</code>string with <a href="#">links!</a> and other <em>stuff</em>'); +           toBe( +           'I am an <code>HTML</code>string with <a href="#">links!</a> and other <em>stuff</em>' +           );         }); -     </doc:scenario> -   </doc:example> +     </file> +   </example>   */  var ngBindHtmlDirective = ['$sce', '$parse', function($sce, $parse) {    return function(scope, element, attr) { | 
