Currently, I have a ui-view
set up as follows:
<div ui-view="filtersView_ModalA" class="filter-container"></div>
Now, my goal is to create generic routes that can accommodate any new filterView implementations. For example:
<div ui-view="filtersView_ModalB" class="filter-container"></div>
This should be handled by the same route.
The specific Modal (ModalA or ModalB) is determined by stateParams.prodType
.
.state('Modal.tabs', {
url: .......,
views: {
'filtersView_{{stateParams.prodType}}@Modal.tabs': {
templateUrl: function(stateParams) {
// stateParams.prodType can be accessed here
.....
},
However, this method does not seem to be working for me.
I've also attempted alternatives like
'filtersView_' + stateParams.prodType + '@Modal.tabs' : {
But nothing has been successful so far.
Is it possible to declare a constant and concatenate the values in view names?
Any feedback on what may be going wrong would be greatly appreciated.