lbertenasco / ap-ng2-fullcalendar

Angular2 fullcalendar component
MIT License
35 stars 18 forks source link

Failed to load ap-angular2-fullcalendar #2

Closed sabb123 closed 7 years ago

sabb123 commented 7 years ago

I have followed the installation instructions from https://github.com/lbertenasco/ap-ng2-fullcalendar

But I keep getting this error. Error: Error: XHR error (404 Not Found) loading http://localhost:57870/ap-angular2-fullcalendar

Can you please help with this issue? Do we need to add anything in systemjs.config.js file? Thank you

lbertenasco commented 7 years ago

Hi @shaliadiga I've only tested it on a project created with https://github.com/angular/angular-cli/. For the systemjs.config.js you will definitely need to add it there. If you want attach your systemjs.config.js and I can give you a hand. Thanks!

sabb123 commented 7 years ago

Thank you for your email. I have attached the systemjs file. I am using asp core. These files get created under wwwroot from the gulp file. Thank you. Appreciate your help. ---------- Forwarded message ---------- From: "Shalini Adiga - CTSX" adigas099@superiorcourt.maricopa.gov Date: Mar 28, 2017 11:47 AM Subject: Angular2-fullcalendar Error To: "shaliadiga@gmail.com" shaliadiga@gmail.com Cc:

Shalini Adiga

lbertenasco commented 7 years ago

Hey @shaliadiga please attach the file or the content as a comment on this issue. Sadly email attachments do not work here.

sabb123 commented 7 years ago

Systemjs.config.js file

(function (global) { System.config({ map: { app: 'lib/spa',

        // angular bundles
        '@angular/core': 'lib/@angular/core/bundles/core.umd.js',
        '@angular/common': 'lib/@angular/common/bundles/common.umd.js',
        '@angular/compiler': 'lib/@angular/compiler/bundles/compiler.umd.js',
        '@angular/platform-browser': 'lib/@angular/platform-browser/bundles/platform-browser.umd.js',
        '@angular/platform-browser-dynamic': 'lib/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
        '@angular/http': 'lib/@angular/http/bundles/http.umd.js',
        '@angular/router': 'lib/@angular/router/bundles/router.umd.js',
        '@angular/forms': 'lib/@angular/forms/bundles/forms.umd.js',

        'angular2-datatable': 'lib/angular2-datatable',
        'lodash': 'lib/lodash/lodash.js',
        'moment': 'lib/moment/moment.js',

        'angular2-fullcalendar': 'lib/ap-angular2-fullcalendar',
        'fullcalendar':'lib/fullcalendar/dist/fullcalendar.js',

        // other libraries
        'rxjs': 'lib/js/rxjs'
    },
    // packages tells the System loader how to load when no filename and/or no extension
    packages: {
        app: {
            main: './main.js',
            defaultExtension: 'js'
        },
        rxjs: {
            defaultExtension: 'js'
        },

        'angular2-datatable': {
            main: 'index.js',
            defaultExtension: 'js'
        },

        'angular2-fullcalendar': {
            main: 'index.js',
            defaultExtension: 'js'
        },

        'fullcalendar': {
            defaultExtension: 'js'
        },

        'moment': { defaultExtension: 'js' }

    }
});

})(this);

lbertenasco commented 7 years ago

Try replacing 'angular2-fullcalendar': 'lib/ap-angular2-fullcalendar', With 'ap-angular2-fullcalendar': 'lib/ap-angular2-fullcalendar',

And

'angular2-fullcalendar': {
    main: 'index.js',
    defaultExtension: 'js'
},

with

'ap-angular2-fullcalendar': {
    main: 'index.js',
    defaultExtension: 'js'
},

Systemjs.config.js:


(function (global) {
    System.config({
        map: {
            app: 'lib/spa',

            // angular bundles
            '@angular/core': 'lib/@angular/core/bundles/core.umd.js',
            '@angular/common': 'lib/@angular/common/bundles/common.umd.js',
            '@angular/compiler': 'lib/@angular/compiler/bundles/compiler.umd.js',
            '@angular/platform-browser': 'lib/@angular/platform-browser/bundles/platform-browser.umd.js',
            '@angular/platform-browser-dynamic': 'lib/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
            '@angular/http': 'lib/@angular/http/bundles/http.umd.js',
            '@angular/router': 'lib/@angular/router/bundles/router.umd.js',
            '@angular/forms': 'lib/@angular/forms/bundles/forms.umd.js',

            'angular2-datatable': 'lib/angular2-datatable',
            'lodash': 'lib/lodash/lodash.js',
            'moment': 'lib/moment/moment.js',

            'ap-angular2-fullcalendar': 'lib/ap-angular2-fullcalendar',
            'fullcalendar':'lib/fullcalendar/dist/fullcalendar.js',

            // other libraries
            'rxjs': 'lib/js/rxjs'
        },
        // packages tells the System loader how to load when no filename and/or no extension
        packages: {
            app: {
                main: './main.js',
                defaultExtension: 'js'
            },
            rxjs: {
                defaultExtension: 'js'
            },

            'angular2-datatable': {
                main: 'index.js',
                defaultExtension: 'js'
            },

            'ap-angular2-fullcalendar': {
                main: 'index.js',
                defaultExtension: 'js'
            },

            'fullcalendar': {
                defaultExtension: 'js'
            },

            'moment': { defaultExtension: 'js' }

        }
    });
})(this);
sabb123 commented 7 years ago

Unfortunately this not helping either , still getting the same error

lbertenasco commented 7 years ago

Are you sure the folder lib/ap-angular2-fullcalendar exists? Maybe you are not including the package into the build.

Try with this.

Systemjs.config.js:

  'ap-angular2-fullcalendar': 'node_modules/ap-angular2-fullcalendar',
sabb123 commented 7 years ago

The folder lib/ap-angular2-fullcalendar does exist and is part of the build in the gulp. However I tried with this as well, 'ap-angular2-fullcalendar': 'node_modules/ap-angular2-fullcalendar' but still the same issue.

lbertenasco commented 7 years ago

Could you provide a sample project (github repo or plunkr) so I can reproduce and debug this issue?