I have integrated an Angular4 app into a WordPress plugin (so in some PHP code). In a view I call all the files I get by making a publish "ng build -prod"
<script type="text/javascript" src="{{PLUGIN_URL}}assets/js/inline.bundle.js"></script>
<script type="text/javascript" src="{{PLUGIN_URL}}assets/js/polyfills.bundle.js"></script>
<script type="text/javascript" src="{{PLUGIN_URL}}assets/js/vendor.bundle.js"></script>
<script type="text/javascript" src="{{PLUGIN_URL}}assets/js/main.bundle.js"></script>
My Angular app works very well into the PHP code. Now my problem is I need to pass an "id" from the PHP app to the Angular app. What will be the best solution / architecture?
Something like : "main.bundle.js?id=".myIdValue."
It would be better that this "id" stay hidden from the final user (so not displayed into the navigator URL...). How would you do that?