I am trying to start my development in WebOS. I just started with a simple application with a label and a button. Here's the code snippet:

<div class="palm-body-text">

    <div id="main" class="palm-hasheader"> 

     <div class="palm-header">First Scene</div>  
     <div class="palm-text">Welcome to my World</div>  
     <div class="myButton" x-mojo-element="Button"></div>  

    </div> 
</div>

In emulator it's not showing up the button. Also its giving a warning on button line which says

unknown attribute x-mojo-element.

Any suggestion?

有帮助吗?

解决方案

You have to setup the button in the scene assistant first. The button is only rendered after you call this.controller.setupWidget in the scene assistant's setup function. Until you do that it's just a div without any special meaning.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top