如何通过requireJs实现复杂的前端模块化开发?
- 内容介绍
- 文章标签
- 相关推荐
本文共计74个文字,预计阅读时间需要1分钟。
javascriptrequire.config({ paths: { jquery: 'http://libs.baidu.com/jquery/2.0.3/jquery' }});
require(['jquery', 'yl'], function($, a) { console.log(aa); var hel=new a.Hello(); alert(1); $(#output).text(Hello, World!);});
gistfile1.txtrequire.config({ paths:{ jquery: 'libs.baidu.com/jquery/2.0.3/jquery' } }); require(['jquery','yl'],function ($,a) { console.log("aa"); var hel = new a.Hello(); alert("1"); $("#btn").click(function () { console.log(hel.name); }); });
本文共计74个文字,预计阅读时间需要1分钟。
javascriptrequire.config({ paths: { jquery: 'http://libs.baidu.com/jquery/2.0.3/jquery' }});
require(['jquery', 'yl'], function($, a) { console.log(aa); var hel=new a.Hello(); alert(1); $(#output).text(Hello, World!);});
gistfile1.txtrequire.config({ paths:{ jquery: 'libs.baidu.com/jquery/2.0.3/jquery' } }); require(['jquery','yl'],function ($,a) { console.log("aa"); var hel = new a.Hello(); alert("1"); $("#btn").click(function () { console.log(hel.name); }); });

