I tried creating a sample project from quickstart in angular 2.0.0 in 
aspnetcore, The application is compiling but when i execute the application 
i am getting the following error in the chrome console

[![index.html:17 Error: SyntaxError: Unexpected token <
        at Object.eval (http://localhost:49928/app/main.js:6:36)
        at eval (http://localhost:49928/app/main.js:10:4)
        at eval (http://localhost:49928/app/main.js:11:3)
    Evaluating 
http://localhost:49928/node_modules/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js
    Evaluating http://localhost:49928/app/main.js
    Error loading http://localhost:49928/app/main.js][1]][1]

I have checked in the application in the Github 
<https://github.com/snkrishnan1/Angular2AspNetCore>
: https://github.com/snkrishnan1/Angular2AspNetCore


I tried debugging the Network tab in the chrome console and notice that 
Index.html is rendered multiple times. Please refer the attached 
snapshot.[image: 
enter image description here] <http://i.stack.imgur.com/Ri04U.png>As per 
the error in the line: 17 of index.html it tries to load the application

System.import('app').catch(function(err){ console.error(err); });   

Please find the systemjs.config.js file

(function (global) {
    System.config({
        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',
            // other libraries
            'rxjs': 'npm:rxjs',
            'angular2-in-memory-web-api': 'npm:angular2-in-memory-web-api',
        },
        // 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);

any ideas why I'm getting this error?

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to