I want to use current currency symbol in custom module Js.
define([
'jquery',
'ko',
'uiComponent'
], function ($, ko, component) {
'use strict';
return component.extend({
initialize: function () {
this._super();
this._render();
},
_render:function(){
var self = this;
console.log("need current currency symbol here.");
},
defaults: {
template: 'Namespace_Modulename/product/view/price',
},
});
});
Any suggestion would be appreciated.
Thanks
Best Answer
For this first you have to create a block file as below:
In it's template you need to call above function and pass the value to your js file as below:
create your js file as below where you will get your current currency symbol.