angular2 routing - How to display details of an item next to the parent in Angular 2? -


i have multiple datasets listed on page , on clicking on of them display details below it. change routing on click, example '/datasets' '/datasets/1234567'.

i added routing '/datasets', can't figure out how tell angular 2 display item details next summary. tried add 1 router-outlet element next each summary idea display details in element, can't specify "name" attribute of router-outlet id of dataset example {{dataset.id}} - template parser throws syntax error.

please check attached screencast.enter image description here

it looks overestimated challenge. there few ways achieve it:

  1. the parent component - prints datasets create router-outlet element. then, child route :id added , dataset details rendered in router-outlet element. router-outlet element can displayed next dataset summary using css.
  2. the child component (dataset-details) may notify parent id of dataset. then, parent component render render-outlet next summary of dataset same id.

Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -