title: Angular 4 permissions management in template and route using route data
body: <p>I want to add some permissions in my angular apps. I already have my current user permission list when successfully logged in and I save in on local storage.</p>
  
  <p>Here is some example of my permission data</p>
  
  <pre><code>{id: 9, name: "configuration.role.restore", display_name: "Restore Role", description: ""}
  </code></pre>
  
  <p>I have searched this and looks like I looks like I can use route.data to solve my problem, but I don't know how to set and use it.</p>