0

I downloaded Angular2 Quick Start from GitHub enter link description here. I moved all configuration files to config directory to keep my project organized. therefore; I ran into an issue "404 GET /app/app.component.js" as shown below.

So, my project looks like:

  • Project_Name
  • App
    • app.component.ts
    • main.ts
  • config
    • includes all configurations files (tsconfig, typings, package, etc..)

# Sample of output

16.06.25 19:08:55 304 GET /main.js 16.06.25 19:08:55 304 GET /node_modules/@angular/platform-browser-dynamic//bundles/platform-browser-dynamic.umd.js 16.06.25 19:08:55 404 GET /app/app.component.js 16.06.25 19:08:55 304 GET /node_modules/@angular/common//bundles/common.umd.js 1 16.06.25 19:08:55 304 GET /node_modules/@angular/compiler//bundles/compiler.umd.js 16.06.25 19:08:55 304 GET /node_modules/@angular/core//bundles/core.umd.js 16.06.25 19:08:55 304 GET /node_modules/@angular/platform-browser//bundles/platform-browser.umd.js

# Main.ts

import {bootstrap}    from '@angular/platform-browser-dynamic';
import {AppComponent} from "app.component";

bootstrap(AppComponent);

# app.component.ts

import {Component} from '@angular/core';

@Component({
    selector: 'my-app',
    template: '<h1>My First Angular 2 App</h1>'
})
export class AppComponent { }

1
  • Can you create a plunker for the same.. Commented Jun 26, 2016 at 6:38

1 Answer 1

0

This can be solved by changing import {AppComponent} from "app.component";
to

import {AppComponent} from "./app.component";

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.