title: if statement read only one condition angular 13
body: <p><a href="https://i.stack.imgur.com/HOkDa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HOkDa.png" alt="enter image description here" /></a></p>
  <pre><code>case Role.PARENT: { 
      if (this.user.profile == null) { 
          this.router.navigate([`/profil-parent`]); 
          console.log('here into profil parent'); 
      } else { 
          this.router.navigate([`/dashboard`]); 
          console.log('here into dashboard'); 
      } 
      break; 
  } 
  case Role.ENSEIGNANT: { 
      break; 
  } 
  </code></pre>
  <p>I have an if statement, in case the user has no profile. I want him to navigate to a special page. If he has a profile, I want him to navigate to the dashboard. But the if statement works only on one condition, can anyone tell me why?</p>