问题
In my routing configuration I can either set the property "controlId" or "targetControl" to specify the ID of the control where I want to put my new view. The only difference I figured out so far is that it seems that "controlId" has a higher priority. Means: If I specify both controlId is used.
Despite that, is there any difference between these keys or are they synonyms? The same goes for "targetAggregation" and "controlAggregation"?
I've read a lot of SAP documentation but I couldn't find a page where every parameter is explained and especially I wasn't able to find the answer for this question.
回答1:
The documentation states targetControl and targetAggregation as deprecated since 1.28.
In the sourcecode you can find some places where the pre 1.28 route configs are converted to the new route config including targets, which were introduced at that version. That might explain the naming: targetControl and targetAggregation have there origin a time where there was no separate target configuration object but everything was defined within the route.
You can find the available parameters more or less explained in the developer guide: overview and more details on parameters here.
来源:https://stackoverflow.com/questions/39489463/sapui5-routing-difference-between-controlid-and-targetcontrol