http://requirejs.org/RequireJS प्लगइन (order.js)
मैं हाल ही में require.js 2.0 डाउनलोड किया है और मैं अपने कंसोल में त्रुटि हो रही है:
Uncaught TypeError: Object function(){var g=ga.call(arguments,0),e;if(f&&v(e=g[g.length-1]))e.__requireJsBuild=!0;g.push(d);return b.apply(null,g)} has no method 'nameToUrl'
order.js प्लगइन अभी भी requirejs द्वारा समर्थित है? मुझे वेबसाइट में इसका दस्तावेज नहीं दिख रहा है।
जब मैं फ़ाइल को हटाने की कोशिश करता हूं तो स्क्रिप्ट टूट जाती है।
<!DOCTYPE html>
<html>
<head>
<title>
My Mobile Application
</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css" />
<link rel="stylesheet" href="public/css/style.css" />
<script data-main="scripts/main.js" src="scripts/require.js"></script>
</head>
<body></body>
</html>
तब मेरे main.js फ़ाइल में
:
मेरी इंडेक्स फ़ाइल में, मैं शीर्ष अनुभाग में requirejs स्क्रिप्ट शामिल
requirejs.config({
//By default load any module IDs from js/lib
baseUrl: 'js/lib',
//except, if the module ID starts with "app",
//load it from the js/app directory. paths
//config is relative to the baseUrl, and
//never includes a ".js" extension since
//the paths config could be for a directory.
paths: {
app: '../app',
assets: '../assets',
views: '../app/views',
templates: '../app/templates',
collections: '../app/collections',
models: '../app/models'
}
});
// Start the main app logic.
requirejs([
'jquery/jquery',
'assets/jqm.config',
'jquery/mobile',
'text'
]);
require([
'app'
],
function(App){
$(document).ready(function(){
App.initialize();
});
}
);
मैं इसे करने के लिए देखता है कि App.initialize नहीं करता ' टी में कोई त्रुटि नहीं है और App.initialize क्या कर रहा है बस सरल भौगोलिक स्थान है। Requjs बस order.js के लिए पूछते हैं, और जब मैं कोड डालता हूं तो ऊपर वर्णित वही त्रुटि होती है।
धन्यवाद!
[स्टैक ओवरफ़्लो एक मन रीडर नहीं है] (http://meta.stackexchange.com/a/128551/177538)। कोड क्या है? – Joseph
इसके बारे में क्षमा करें। संपादित। :) –