Ich bin neu in Winkel- und ich versuche, ein Saatgut-ProjektUncaught SyntaxError- unerwartetes Token + 1 mehr
<!DOCTYPE html>
<html>
<head>
<title>Angular 2 Seed [using RC4] - Minimalistic TypeScript starter project</title>
<base href="." />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1" />
<!-- @exclude -->
<link rel="stylesheet" href="styles/vendor/coresheet.min.css" />
<link rel="stylesheet" href="styles/app.css" />
<script src="src/vendor/node_modules/system.src.js"></script>
<script src="src/vendor/node_modules/Reflect.js"></script>
<script src="src/vendor/node_modules/zone.js"></script>
<script src="src/vendor/node_modules/long-stack-trace-zone.js"></script>
<script src="app/system.conf.js"></script>
<!-- @endexclude -->
<!-- @include dist.head.html -->
</head>
<body>
<div class="page">
<app>Loading...</app>
</div>
</body>
</html>
app.component.ts auszuführen:
import { Component } from '@angular/core';
import { Router, ROUTER_DIRECTIVES } from '@angular/router';
import { IsRouteActive } from './pipes/is-route-active.pipe';
import { AuthService } from './services/auth.service';
import { PRECOMPILE_COMPONENTS } from './routes';
@Component({
selector: 'app',
templateUrl: 'src/app.component.html',
styleUrls: ['styles/components/app.css'],
providers: [],
directives: [ROUTER_DIRECTIVES],
pipes: [IsRouteActive],
precompile: PRECOMPILE_COMPONENTS
})
export class AppComponent {
isUserAuthorized: boolean = false;
constructor(private _router: Router, private _authService: AuthService) {
this._router.events.subscribe(() => {
this.isUserAuthorized = this._authService.isUserAuthorized();
});
}
logout() {
this._authService.logout();
this._router.navigateByUrl('/');
}
}
System .conf.js:
System.config({
baseURL: './',
map: {
'@angular': 'src/vendor/node_modules/@angular',
'rxjs': 'src/vendor/node_modules/rxjs'
},
packages: {
'src': {
defaultExtension: 'js'
},
'@angular/common': {
main: 'index.js',
defaultExtension: 'js'
},
'@angular/compiler': {
main: 'index.js',
defaultExtension: 'js'
},
'@angular/core': {
main: 'index.js',
defaultExtension: 'js'
},
'@angular/http': {
main: 'index.js',
defaultExtension: 'js'
},
'@angular/platform-browser': {
main: 'index.js',
defaultExtension: 'js'
},
'@angular/platform-browser-dynamic': {
main: 'index.js',
defaultExtension: 'js'
},
'@angular/router': {
main: 'index.js',
defaultExtension: 'js'
},
'rxjs': {
defaultExtension: 'js'
}
}
});
System.import('./src/bootstrap.js').catch(function(err) {
console.error(err);
});
Hier ist die seed-project
Die Fehler sind (nach npm Start)
system.conf.js:1 Uncaught SyntaxError: Unexpected token <
Failed to parse SourceMap: http://localhost:8080/src/vendor/node_modules/Reflect.js.map
Jede Hilfe in dieser Hinsicht wird
jedermann? ! Ich brauche Hilfe –