Ajax code is not working when redirect to

hi all,

I have 2 pages ,one is index.html ,another one is single.html

inside index html i have a link element it goes to singe .html , it go there after i click the kink how ever the aja request that is on single isn’t working , after i click , but its working if I directly visit single.html

    <script type="text/javascript" src="js/framework7.bundle.min.js"></script>
    <script type="text/javascript" src="js/app.js"></script>
  app.request.post('https://jsonplaceholder.typicode.com/posts' ,function (data) {

any steps i missed out ? thanks

Would be good to see more complete example of what you have in those files