Requirejs 使用require.js加载html页面

Requirejs 使用require.js加载html页面,requirejs,Requirejs,我正在开发一个Html应用程序,它使用require.js加载脚本。我有一个主页,它使用jquery load加载 我想知道我们是否可以使用require.js加载html页面。文本插件是您的朋友。看到了吗 引用前者的话: require(["some/module", "text!some/module.html", "text!some/module.css"], function(module, html, css) { //the html variable wi

我正在开发一个Html应用程序,它使用require.js加载脚本。我有一个主页,它使用jquery load加载


我想知道我们是否可以使用require.js加载html页面。

文本插件是您的朋友。看到了吗

引用前者的话:

require(["some/module", "text!some/module.html", "text!some/module.css"],
    function(module, html, css) {
        //the html variable will be the text
        //of the some/module.html file
        //the css variable will be the text
        //of the some/module.css file.
    }
);