File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1578,14 +1578,14 @@ List of 300 VueJS Interview Questions
1578
1578
1579
1579
53. ### Is it possible to pass parameters for filters?
1580
1580
Yes, you can pass arguments for a filter similar to a javascript function . The generic structure of filter parameters would be as follows,
1581
- ```javascript
1581
+ ```vue
1582
1582
{{ message | filterA (' arg1' , arg2 ) }}
1583
1583
` ` `
1584
1584
In this case, filterA takes message expression as first argument and the explicit parameters mentioned in the filter as second and third arguments.
1585
1585
1586
1586
For example, you can find the exponential strength of a particular value
1587
- ` ` ` javascript
1588
- {{ 2 | exponentialStrength (10 ) }} // prints 2 power 10 = 1024
1587
+ ` ` ` vue
1588
+ {{ 2 | exponentialStrength (10 ) }} <!-- prints 2 power 10 = 1024 -->
1589
1589
` ` `
1590
1590
1591
1591
**[⬆ Back to Top](#table-of-contents)**
You can’t perform that action at this time.
0 commit comments