Hi Keerthana,
It's not what I want exactly. Let's apply the scenario on your sample app:
- In app component, you've navigation links for Home & Toolbar components.
What I want is:
when you click on home link, you will show the toolbar items related to home component at the far right of the app component, and when you click on the toolbar link, you will get the toolbar items related to toolbar component at that same location.
Please see the screenshots to get clear understanding:
This is when you click home:

And this is when you click Toolbar:

|
<div id="fileExplorerSearchbar" style="float:right;padding-top:10px" [style.display]="search">
<input class="e-searchBar e-tool-input" type="text" placeholder="Search">
</div>
<div style="float:right;padding-top:10px" [style.display]="ddl" width="50%">
<input id="bookSelect" ej-dropdownlist [dataSource]="data" [fields]="fieldsvalues" [(value)]="value" />
</div>
<div style="float:right;padding-top:10px" [style.display]="button">
<input type="button" ej-button id="button" value="create" size="small" />
</div> |
I could do that, but it is not dynamic solution I'm afraid. If we've many components, let's say 10 and each component have different actions in the toolbar, then the code won't be minimal. I'm looking for a way like having separate toolbar component per component and dynamically inject that toolbar component.
|
<ej-toolbar id="toolbarJson" >
<table>
<tr>
<td>
<div>
<ej-togglebutton type="checkbox" id="togglebutton2" contentType="textandimage" defaultText="Play" size="mini" activeText="Pause" ></ej-togglebutton>
</div>
</td>
<td id="Dropdown" title="Dropdown Control">
<input id="bookSelect" ej-dropdownlist [dataSource]="data" [fields]="fieldsvalues" width="100%" [(value)]="value"/>
</td>
</tr>
</table>
</ej-toolbar> |
|
ngOnInit() {
var tool = document.getElementById("tool");
tool.innerHTML = "";
var toolbar = document.getElementById("toolbarJson");
tool.appendChild(toolbar);
} |