0

I've been playing with require JS now.

This is my config,

var require = {
    baseUrl: 'app/',
    paths: {
        'angular': '../scripts/angular',
        'ui-router': '../scripts/angular-ui-router',
        'ocLazyLoad': '../scripts/ocLazyLoad.min',
    },
    shim: {
        'ui-router': {
            deps: ['angular'],
        },
        'ocLazyLoad': {
            deps: ['angular'],
        },
    }
};

Why is it required to define this dependencies inorder for it to work.

define(['angular', 'ui-router', 'ocLazyLoad'], function () {

Another question, lets just say i have bootstrap css that will be used throughout the application, what is the best way to load it?

Anonymous Duck
  • 2,942
  • 1
  • 12
  • 35

0 Answers0