Results 1 to 2 of 2

Thread: ST2 and HTML

  1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    1
    Vote Rating
    0
      0  

    Default Unanswered: ST2 and HTML

    I've just started researching ST2, have installed the SDK and worked through the first couple of tutorials but one thing is confusing me. Is there a way to have normal HTML files with either CSS class names (as in, say, Twitter Bootstrap) or data elements to specify a particular DOM element as an ST2 component?

    All I see so far is that strings or XTemplates are specified as properties in view/component classes. I'm having trouble seeing how this would work well with our visual designers, who typically hand off HTML and CSS; if my understanding is correct I'd need to convert all their HTML into JS properties with no roundtrips possible.

  2. #2
    Sencha User
    Join Date
    Apr 2010
    Location
    China
    Posts
    227
    Answers
    64
    Vote Rating
    20
      0  

    Default

    You can write your static html/css code in your index.html
    <div id='myContent' style='display:none' class='myComponent'>
    ......
    </div>

    then use 'contentEl' config property for your component.

    {
    xtype:'panel',
    contentEl:'myContent'
    //other config
    }

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •