In TOC, for a layer, I set noLayers: true to simplify the layer's info. It works well when I used API 2.x. But in V3.8, this setup losses function. Could someone hint me how to fix it? Thanks.
Actually the noLayers property is useful in some cases. I wish this can be added in new released API. Thanks to all of the responders. Credit goes to kenbuja.
Remember, the TOC widget is not part of the API. It was developed independently by nliu. You should contact him for any requests about the widget.
If you'd like to hide layers in the TOC, the new version does have a way to do that. Take a look at this post showing how to do that. Note that it does require a 10.1 service.