Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit dba8b7e

Browse files
committed
docs($sce): update example to use array annotations
1 parent b3da946 commit dba8b7e

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/ng/sce.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ function $SceDelegateProvider() {
578578
*
579579
* <example module="mySceApp" deps="angular-sanitize.js">
580580
* <file name="index.html">
581-
* <div ng-controller="myAppController as myCtrl">
581+
* <div ng-controller="AppController as myCtrl">
582582
* <i ng-bind-html="myCtrl.explicitlyTrustedHtml" id="explicitlyTrustedHtml"></i><br><br>
583583
* <b>User comments</b><br>
584584
* By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when
@@ -595,17 +595,17 @@ function $SceDelegateProvider() {
595595
* </file>
596596
*
597597
* <file name="script.js">
598-
* var mySceApp = angular.module('mySceApp', ['ngSanitize']);
599-
*
600-
* mySceApp.controller("myAppController", function myAppController($http, $templateCache, $sce) {
601-
* var self = this;
602-
* $http.get("test_data.json", {cache: $templateCache}).success(function(userComments) {
603-
* self.userComments = userComments;
604-
* });
605-
* self.explicitlyTrustedHtml = $sce.trustAsHtml(
606-
* '<span onmouseover="this.textContent=&quot;Explicitly trusted HTML bypasses ' +
607-
* 'sanitization.&quot;">Hover over this text.</span>');
608-
* });
598+
* angular.module('mySceApp', ['ngSanitize'])
599+
* .controller('AppController', ['$http', '$templateCache', '$sce',
600+
* function($http, $templateCache, $sce) {
601+
* var self = this;
602+
* $http.get("test_data.json", {cache: $templateCache}).success(function(userComments) {
603+
* self.userComments = userComments;
604+
* });
605+
* self.explicitlyTrustedHtml = $sce.trustAsHtml(
606+
* '<span onmouseover="this.textContent=&quot;Explicitly trusted HTML bypasses ' +
607+
* 'sanitization.&quot;">Hover over this text.</span>');
608+
* }]);
609609
* </file>
610610
*
611611
* <file name="test_data.json">

0 commit comments

Comments
 (0)