Skip to content

Can't load app.component.html with relative path #2293

@richavyas

Description

@richavyas

Please provide us with the following information:

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
    Mac OSX (Yosemite)
  2. Versions. Please run ng --version. If there's nothing outputted, please run
    in a Terminal: node --version and paste the result here:
    angular-cli: 1.0.0-beta.14
    node: 6.1.0
    os: darwin x64
  3. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.
    This app ran successfully with the latest webpack/angular-cli@latest but it's not loading app.component.html with relative path.

source code:

app.component.ts

   styleUrls: ['./app.component.scss'],
   templateUrl: './app.component.html',

Error:

zone.js:1241GET http://localhost:4200/app.component.html 404 (Not Found) zone.js:344 Unhandled Promise rejection: Failed to load app.component.html ; Zone: <root> ; Task: Promise.then ; Value: Failed to load app.component.html undefined

Setup info:

Router : upgraded to rc.7
Webpack: "2.1.0-beta.22"
angular-cli@latest

  1. The log given by the failure. Normally this include a stack trace and some
    more information.
    No error while ng build or serve. Build happens successfully but this does not load files with relative path.
  2. Mention any other details that might be useful.
    Things work upto certain extent when used complete folder structure like app/app/component.html or app/components/...

Thanks! We'll be in touch soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions