0

好的,我不知道发生了什么,但货币过滤器不能以角度工作。它只是向我显示一个空白区域。另外,我刚刚开始学习 Angular。如果有人可以帮助我,那就太好了

这是我的代码:

<!DOCTYPE html>

<html>
    <head>
        <meta charset="UTF-8">
        <title>AngularJS</title>
        <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
    </head>

    <body ng-app="">
        Currency: <input type="text" ng-model="price"> <br>
        {{'Welcome' + price| currency}}
        <script>

        </script>

    </body>
</html>
4

1 回答 1

0

你应该使用

{{'Welcome' + (price| currency)}}

因为角度的优先级较低

于 2020-05-08T08:07:00.790 回答