title: Angular2 getting route data with routes url?
body: <p>I got a constant array of routes called <code>AppRoutes</code> that contains all routes of my app. I wrote a function called <code>getRoutesAuth(path)</code> that uses the the <code>path</code> parameter to iterate through the <code>AppRoutes</code> array, returning an array of the data property of the routes of <code>path</code>. Is there a built in way to get a route's data property by a given path?</p>