F
F
flafy42020-03-12 12:45:11
JavaScript
flafy4, 2020-03-12 12:45:11

How to implement comparison of current url and route object in angular?

Hello! There is a route - '/files/sources/test1', and there is a list of routes:

{
  path: 'files',
    children: [
    	{
      	path: 'sources',
        children: [
        	{
          	path: 'test1'
          },
          {
          	path: 'test2'
          }
        ]
      },
      {
      	path: 'common'
      }
    ]
  }


How do I recursively find the object last in the reference, namely
{
     path: 'test1'
}
and return true if found or false if not found?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question