February 2015
Intermediate to advanced
232 pages
4h 40m
English
To configure RequireJS, create a file at the same level as the viewmodel.js file lies. You can call it main.js, and follow these steps:
config method:require.config({
});Require.config({
baseUrl:'js'
});paths attribute. This helps you to avoid writing long paths in our module dependencies. You don't need to define the extension. RequireJS adds the extension for you:require.config({
baseUrl:'js',
paths: {
bootstrap:'vendors/bootstrap.min',
icheck: 'vendors/icheck',
jquery: 'vendors/jquery.min',
mockjax: 'vendors/jquery.mockjax',
mockjson: 'vendors/jquery.mockjson', ...Read now
Unlock full access