Is there a way to transfer a value from config.js file to Geturl.vue?
The content of the config.js file is as follows:
var myUrl = "http://localhost:7070/#/";
The code snippet in my view file (Geturl.vue) is shown below:
<div id="app>>
<p>{{loadNewUrl}}</p>
</div>
Here is the script for Geturl.vue:
<script>
import config from '/config.js';
export default {
name: 'App',
components: {
},
data(){
return{
loadNewUrl: myUrl, /** How can we retrieve the value of myUrl from config.js file? **/
}
}
</script>