lundi 25 janvier 2021

Ember routes not displaying template content

For some reason, all Ember routes stopped working for me. I was working on a login route, where a login pop-up appears. Everything worked fine. After I saved the changes, made sure again that it's working and closed everything, upon starting the app again all routes stopped working - they don't display any content. The main page/route works still fine.

I tried to restart my pc and the app. I tried to overwrite the login route. I tried to generate entirely new route with just some basic "Hello" line to see if it's working (it's not). I even tried to create an entirely new app, still not working.

I use ember g route XY to generate routes.

Here is how the login template looks (was fully functionable):




<div id="popup" class="modal-bg">
    <div class="modal">
      <div class="center">
        <form action = "#">
          <div class="data">
            <span class='label'>Email or Username</span>
            <input type="text" required>
          </div>
          <div class="data">
            <span class='label'>Password</span>
            <input type="password" required>
          </div>
          <div class = "forgot-pass"><a href="">Forgot password?</a></div>
          <div class = "btn">
            <div class= "inner"></div>
            <button type = "submit">Log in</button>
          </div>
        </form>
      </div>
    </div>
  </div>


<script>
 var modal = document.getElementById('popup');

 window.onclick = function(event) {
   if (event.target == modal) {
     window.history.go(-1); return false;
   }
 }
</script>

Here is some basic route template which is supposed to write "hello" under the footer, but it also doesn't work anymore

 
   <p>hello</p>>
 

Any ideas what is the cause and how can I fix it? Thank you!




Aucun commentaire:

Enregistrer un commentaire