user3199840 user3199840 - 1 year ago 45
AngularJS Question

Dynamically load a detail-template with sub-menu and nested view in expandeble table row

I'm building a webpage with Angularjs and Django.

There is a main navbar in the top and a main div for the content. Click "list" and load a list of objects as a table with the ng-repeat. Basic single page app.

But each row will have a empty hidden row with no content under it. When I click the row I want to dynamically get a detail-template inside the extra row and display it.

This detail-template would have a detail-sub-menu (extra info, files, comments, etc) and a small detail-sub content to display in. (So I dont have to load every objects extra content at the list level)

Is this kind of nesting possible with Angular or should I go with another framework?


What you are looking for is a directive there is a kind of a directive that is template expanding, meaning you can add in your template together with its functionality by just simply adding your custom element <your-element></your-element>

Here's the the official docs , look for the element one