https://github.com/Wilkuuu/Biblio
In Books component in html i`ve :
<a
routerLink="/books/{{book.id}}"
class="btn btn-secondary btn-sm">
<i class="fa fa-file"></i>
</a>
in app-routing :
{ path: 'book/:id', component: BookDetailComponent }
In URL i see an id from firebase, but the path provides me to :
{ path: '**' , component: NotfoundComponent },
Just have a look at your route config:
{ path: 'book/:id', component: BookDetailComponent }
The route that you should be using is book/
and not books/
routerLink="/books/{{book.id}}"
should be
routerLink="/book/{{book.id}}"
And yeah, as mentioned by Andrei, the catch-all route(the one with path: '**'
) should be the last route in your route config.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With