मैं वास्तव में इसके बारे में खो गया हूं। जब मैं अपना एंगुलर 2 ऐप लोड करता हूं, तो मेरे पास node_modules/systemjs
के तहत गैर-मौजूदा फ़ाइलों के लिए मेरे सर्वर पर लगभग 200 अनुरोध हैं। यहाँ उन अनुरोधों का का एक नमूना है:सिस्टमजेएस गैर-मौजूदा फ़ाइलों के लिए ~ 200 अनुरोध बना रहा है
127.0.0.1 - - [13/Sep/2016 13:00:06] "GET /node_modules/systemjs/dist/Subject.js.map HTTP/1.1" 404 -
127.0.0.1 - - [13/Sep/2016 13:00:06] "GET /node_modules/systemjs/dist/Observable.js.map HTTP/1.1" 404 -
127.0.0.1 - - [13/Sep/2016 13:00:06] "GET /node_modules/systemjs/dist/root.js.map HTTP/1.1" 404 -
127.0.0.1 - - [13/Sep/2016 13:00:06] "GET /node_modules/systemjs/dist/toSubscriber.js.map HTTP/1.1" 404 -
127.0.0.1 - - [13/Sep/2016 13:00:06] "GET /node_modules/systemjs/dist/Subscriber.js.map HTTP/1.1" 404 -
127.0.0.1 - - [13/Sep/2016 13:00:06] "GET /node_modules/systemjs/dist/isFunction.js.map HTTP/1.1" 404 -
127.0.0.1 - - [13/Sep/2016 13:00:06] "GET /node_modules/systemjs/dist/Subscription.js.map HTTP/1.1" 404 -
127.0.0.1 - - [13/Sep/2016 13:00:06] "GET /node_modules/systemjs/dist/isArray.js.map HTTP/1.1" 404 -
127.0.0.1 - - [13/Sep/2016 13:00:06] "GET /node_modules/systemjs/dist/isObject.js.map HTTP/1.1" 404 -
127.0.0.1 - - [13/Sep/2016 13:00:06] "GET /node_modules/systemjs/dist/tryCatch.js.map HTTP/1.1" 404 -
127.0.0.1 - - [13/Sep/2016 13:00:06] "GET /node_modules/systemjs/dist/errorObject.js.map HTTP/1.1" 404 -
127.0.0.1 - - [13/Sep/2016 13:00:06] "GET /node_modules/systemjs/dist/UnsubscriptionError.js.map HTTP/1.1" 404 -
127.0.0.1 - - [13/Sep/2016 13:00:06] "GET /node_modules/systemjs/dist/Observer.js.map HTTP/1.1" 404 -
127.0.0.1 - - [13/Sep/2016 13:00:06] "GET /node_modules/systemjs/dist/rxSubscriber.js.map HTTP/1.1" 404 -
127.0.0.1 - - [13/Sep/2016 13:00:06] "GET /node_modules/systemjs/dist/observable.js.map HTTP/1.1" 404 -
127.0.0.1 - - [13/Sep/2016 13:00:06] "GET /node_modules/systemjs/dist/ObjectUnsubscribedError.js.map HTTP/1.1" 404 -
127.0.0.1 - - [13/Sep/2016 13:00:06] "GET /node_modules/systemjs/dist/SubjectSubscription.js.map HTTP/1.1" 404 -
127.0.0.1 - - [13/Sep/2016 13:00:06] "GET /node_modules/systemjs/dist/from.js.map HTTP/1.1" 404 -
मेरे Angular2 आवेदन ठीक काम करता है, मैं एक ही त्रुटि नहीं मिलता है, सब कुछ काम करता है के रूप में उम्मीद। लेकिन उन ~ 200 404 अनुरोध वास्तव में पेज लोड को धीमा कर रहे हैं। एक कारण से मैं वास्तव में समझ नहीं पा रहा हूं, उन 404 अनुरोध मेरे ब्राउज़र के network
टैब में भी दिखाई नहीं देते हैं, लेकिन वायर्सहार्क पुष्टि करता है कि वे वहां से आ रहे हैं।
यहाँ मेरी systemjs.config.js
है:
/**
* System configuration for Angular 2 samples
* Adjust as necessary for your application needs.
*/
(function (global) {
System.config({
defaultJSExtensions: true,
paths: {
// paths serve as alias
'npm:': 'node_modules/'
},
// map tells the System loader where to look for things
map: {
// our app is within the app folder
app: 'app',
// angular bundles
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
// angular testing umd bundles
'@angular/core/testing': 'npm:@angular/core/bundles/core-testing.umd.js',
'@angular/common/testing': 'npm:@angular/common/bundles/common-testing.umd.js',
'@angular/compiler/testing': 'npm:@angular/compiler/bundles/compiler-testing.umd.js',
'@angular/platform-browser/testing': 'npm:@angular/platform-browser/bundles/platform-browser-testing.umd.js',
'@angular/platform-browser-dynamic/testing': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js',
'@angular/http/testing': 'npm:@angular/http/bundles/http-testing.umd.js',
'@angular/router/testing': 'npm:@angular/router/bundles/router-testing.umd.js',
'@angular/forms/testing': 'npm:@angular/forms/bundles/forms-testing.umd.js',
// other libraries
'rxjs': 'npm:rxjs',
'angular2-in-memory-web-api': 'npm:angular2-in-memory-web-api',
'moment': 'npm:moment/moment',
'ng2-bs3-modal': 'npm:ng2-bs3-modal',
},
// 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-in-memory-web-api': {
main: './index.js',
defaultExtension: 'js'
},
}
});
})(this);
उत्तर के लिए धन्यवाद अक्षम कर सकते हैं। मैं स्पष्ट रूप से वेब देव के लिए नया हूं और यह भी महसूस नहीं किया कि उन अनुरोधों को केवल तब ही आ रहा था जब डीबग खुली थी। सिस्टमज डॉक्स को जांचने और पढ़ने के बाद भी, मुझे अभी भी पथ के साथ समस्या है। क्या मेरे systemjs कॉन्फ़िगरेशन के साथ कुछ भी गलत है? – Juicy