InterviewSolution
| 1. |
What Is Config Function? |
|
Answer» The Require JS can be initialized by passing the main configuration in the HTML template through the data-main attribute. If you want to update the Require JS configuration values with your own configurations value. You can do USING the require js. Config FUNCTION. The configurations options:-
Example looks like:- require.config({ baseUrl: 'scripts/app', paths: { lib: '../lib' }, shim: { 'backbone': { deps: ['underscore'], exports: 'Backbone' } } }); The Require JS can be initialized by passing the main configuration in the HTML template through the data-main attribute. If you want to update the Require JS configuration values with your own configurations value. You can do using the require js. Config function. The configurations options:- Example looks like:- require.config({ baseUrl: 'scripts/app', paths: { lib: '../lib' }, shim: { 'backbone': { deps: ['underscore'], exports: 'Backbone' } } }); |
|