In all my recent SPA-related work this layer was not needed at all. Typically the layout has a "section" as the point of insertion, and the view has a "div" as the outer element.
Michael G. Schneider
10 Answers, 1 is accepted
The only benefit I can think about this element is when it comes to destroying/removing views, then that element including the contained view can simply removed from the DOM.
In addition to make the wrapping element optional, I would like to suggest to add an option to apply styles, e.g. class or other attributes, to it.
Regards,
Holger
Thank you for the feedback. The destroy/removing feature will work without the wrapping element, in fact - but it might be confusing (but not that much in the jQuery world) if the view element property actually contains more than one element. We will consider these suggestions in our next iteration.
Holger, currently the recommended time to customize the view element would be in the view init event handler.
Kind regards,
the Telerik team
thanks a lot for the answer.
In all my SPA-testing during the last couple of weeks the view never contained a list of elements at its top. There always was a single div, or something similar like section or article. This topmost element was there for good reason. It had an id, it had certain classes, it was the starting point for styling,
So from a practical standpoint, I am sure that most of the time there will be a single top element.
Michael G. Schneider
Thank you again for the suggestion. I logged the idea in our internal system and we will do our best to provide such feature as soon as possible.
Regards,
Iliana Nikolovathe Telerik team
What's new
The wrapping HTML element that is created for the view should be optional
How can I achieve that? I tried by setting "tagName" to an empty string and to undefined. None seems to work.
Michael G. Schneider
FYI: After looking into the sources I discovered that there is now an option field named wrap that can be set to false to omit the wrapper element.
That is correct - the wrap configuration option is the newly introduced feature we have been discussing.
Regards,Petyo
the Telerik team
@Holger, thanks for looking into the sources.
@Petyo, a generic question: will the documentation be updated for each internal build? Or will it only contain what is available as OpenSource?
Michael G. Schneider
In general, we don't introduce new features in internal builds (or in Service Packs, for that matter), so documentation does not follow the internal builds. However, in that case I think that it is safe for the docs to be updated - please see the updated info here.
Kind regards,Petyo
the Telerik team
perfect, thanks a lot for the information.
The situation is a little bit difficult, as the OpenSource customer does not have access to the "wrap" property (if I understand the licensing issues correctly). So he might be confused, when reading the documentation. However, the paying customer wants to have a consistent documentation.
Michael G. Schneider