I am having trouble understanding this error message:
*Error loading http://localhost:3000/@angular/platform-browser-dynamic as "@angular/platform-browser-dynamic" from http:// localhost:3000/app/main.ts
at o (system.src.js:4597)
at XMLHttpRequest.I.s.onreadystatechange (system.src.js:4597)*
Below is my app.component.cs
import {Component} from "@angular/core";<br/>
import {ListComponent} from "./List/list.component";<br/>
import {ContactComponent} from "./Contact/contact-form.component";
@Component({
selector: 'my-app',
template: `
{{title}}
<a routerLink="/myList"></a><router-outlet></router-outlet>
`
})
export class AppComponent {
title: 'My Angular App';
}
This is the content of app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { RouterModule } from '@angular/router';
import { ListComponent } from './List/list.component'
@NgModule({
imports: [BrowserModule,
RouterModule.forRoot([
{
path: 'myList',
component: ListComponent
}
])],
declarations: [AppComponent,ListComponent],
bootstrap: [AppComponent],
})
export class AppModule { }
Here's what I have in main.ts
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';
platformBrowserDynamic().bootstrapModule(AppModule);
Content found in index.html
<!DOCTYPE html>
<html>
<head>
<title>Angular App</title>
...
</body>
</html>
Information from package.json
{
"name": "angular2-demo",
...
}
}
Details from systemjs.config.js
(function (global) {
System.config({
...
})(this);
Last but not least, here's my tsconfig.json
{
"compilerOptions": {
...
}
}
I've tried multiple solutions without success. As a newcomer to Angular 2, I'm unsure about what's causing the issue. Any assistance would be greatly appreciated.