angularjs自定义过滤器

MyHtml01.html

<html> <head> <title>MyHtml01.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">

<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
<script src="js/angular.js"></script>
<script src="js/angular.min.js"></script>
</head>
{{name|capitalize}}
<script src="js/test04.js">
</script>

test04.js
var app=angular.module('myApp',[]);
app.controller('filteraa',function($scope){

});
app.filter('capitalize',function(){
return function(text){
return text.split("").reverse().join("");
}
})

posted on 2017-05-16 14:09  ShamSilence  阅读(80)  评论(0编辑  收藏  举报

导航