From d7ed885984d58d344350ae267f51e8096bb6bea6 Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Thu, 14 Nov 2013 12:07:01 +0000 Subject: docs(ngBindHtml): fix dependency for Plunker and JSFiddle in example The `` directive does not load up the dependencies correctly. Using the `` directive, with `` elements fixes this. Closes #4951 --- src/ng/directive/ngBind.js | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) (limited to 'src/ng/directive/ngBind.js') 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. - - - + Try it here: enter text in text box and watch the greeting change. + + +

-
- +
+ + + angular.module('ngBindHtmlExample', ['ngSanitize']) + + .controller('ngBindHtmlCtrl', ['$scope', function ngBindHtmlCtrl($scope) { + $scope.myHTML = + 'I am an HTMLstring with links! and other stuff'; + }]); + + + it('should check ng-bind-html', function() { expect(using('.doc-example-live').binding('myHTML')). - toBe('I am an HTMLstring with links! and other stuff'); + toBe( + 'I am an HTMLstring with links! and other stuff' + ); }); - -
+ + */ var ngBindHtmlDirective = ['$sce', '$parse', function($sce, $parse) { return function(scope, element, attr) { -- cgit v1.2.3