Reputation: 51
As you may know Spine controllers create their DOM elements ( <div>
by default ).
How could we prevent creating such elements and use only markup in the view?
I read the documentation but didn't find any information.
Upvotes: 1
Views: 82
Reputation: 166
The relevant line is https://github.com/spine/spine/blob/dev/src/spine.coffee#L488, which says:
@el = document.createElement(@tag) unless @el
In order to avoid having the element be created, you can pass in an el to the constructor. Alternatively, you can call @replace() in your render method to replace the div with your own element.
Upvotes: 3