0

I am new to angularJS.

I want an output like this using angularJs Filter

My first expression: 456 $5.00

If i didn't use the filter then,{{}} displays correctly,but if use filter the output shows as below:

{{ 456+ " " + 56 | currency}}

My code:

<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<body>

<div ng-app>
<p>My first expression: {{ 456 + " " + 5  | currency}}</p>
</div>

</body>
</html>

Any suggestions please.

1
  • I'm sorry, but I don't understand. What do you want to achoeve. What is your input, and what is the desired output? Commented Nov 11, 2016 at 7:54

1 Answer 1

3

Use parentheses: {{ 456 + " " + (5 | currency) }}.

Or just move 456 out of the expression: 456 {{ 5 | currency }}.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.