Domanda

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.

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top