结构-行为-样式-Angularjs-ngSanitize

前端之家收集整理的这篇文章主要介绍了结构-行为-样式-Angularjs-ngSanitize前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

简单点,上代码

<!DOCTYPE html>
<html>
<head>
<Meta charset="UTF-8">
<title>ngSanitize</title>
<script src="../jquery.1.9.1.min.js"></script>
<script src="../angular.js"></script>
<script src="angular-sanitize.js"></script>
</head>
<body ng-app="myApp" ng-controller="myCtrl">
    <div class="container">
        <div class="row" ng-bind-html="content"></div>
    </div>
    <script> var app = angular.module('myApp',['ngSanitize']); app.controller('myCtrl',['$scope',function($scope){ $scope.content = "<ul><li>小明</li><li>李雷</li><li>露西</li><li>海尔</li></ul>"; }]); </script>
</body>
</html>

猜你在找的Angularjs相关文章