onsen ui:在javascript文件中创建onsenui元素

时间:2015-08-04 07:16:41

标签: javascript angularjs onsen-ui

是否可以在不使用Angular的情况下在另一个javascript文件夹中创建onsen ui元素,如果没有,我想我怎么能使用angular只识别我的js文件中的ons指令,我的意思是我不会去使用角度除了这个,因为我已经使用原生javascript

我不太了解角度,我想我必须了解它,但我不能在我完成这个应用程序之前就已经开始了

所以,如果这是我的js代码的一部分

var app = {


    initialize: function() {
        this.bindEvents();
    },
    // Bind Event Listeners
    //
    // Bind any events that are required on startup. Common events are:
    // 'load', 'deviceready', 'offline', and 'online'.
    bindEvents: function() {
        document.addEventListener('deviceready', this.onDeviceReady, false);
    },
    // deviceready Event Handler
    //
    // The scope of 'this' is the event. In order to call the 'receivedEvent'
    // function, we must explicitly call 'app.receivedEvent(...);'
    onDeviceReady: function() {
        app.receivedEvent('deviceready');
        console.log('console');
        db = opendb();
        //alert(db);
        db.transaction(initdb, initError, initSuccess);
        db.transaction(populatedb, initError, initSuccess);
        getHomeContent();
        //db.transaction(GetData, queryError, querySuccess);
        //GetData();
     },
    // Update DOM on a Received Event
    receivedEvent: function(id) {

        console.log('Received Event: ' + id);
    }



};

app.initialize();
(function(){

   document.getElementById("id_page").style.visibility = 'hidden';

})();

我想添加什么来让我的文件识别onsen指令?

0 个答案:

没有答案