How can we use Phonegap with js requirement? I am trying to add to phonegap using the require () method. My code is below and all .js files are in the right place. Please help me, it can load the handset via AMD or use the usual script method, for example
<script type="text/javascript" src="cordova.js"></script>
this is my configuration and methods
require.config({ baseUrl: 'js/lib', paths: { controller: '../controller/controller', model: '../model/model', view: '../view/view', router:'../router/router' }, shim: { 'backbone': { deps: ['underscore', 'jquery','cordova'], exports: 'Backbone' }, 'underscore': { exports: '_' } } }); require(['jquery', 'backbone', 'router', ], function ($, Backbone, Router) { document.addEventListener('deviceready', function () { alert('hi');
source share