Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

[QUESTION] Cannot resolve symbol 'require' #322

Description

@rbasniak

Hi,

I'm a developer with pure desktop background and I'm starting to learn web development now with ASP.NET Core and Angular 2, so please forgive me if this is a stupid question =)

I downloaded this new updated version for Angular 2 final and I'm getting an error on all component files telling me that it 'Cannot resolve symbol require' on the template: require('./name.component.html').

image

Other projects I came across use typings and to resolve such errors I just drag the index.d.ts from the typings folder to my AppModule and unresolved names errors go away.

But this new version does not use typings. Based on this I would like to ask 3 questions:

  1. Is there any way to remove the error on the require symbol? Application is running and working, it's just that's this is annoying.

  2. Why is the require required? Why I can't just use templateUrl instead with the filename?

  3. On all other tutorials I port to Asp.Net Core if I didn't reference the index.d.ts from the typings folder I get a lot of errors of unresolved symbols, like Promisse, Map, etc. But this does not happens with your Angular 2 template. Where are the typings definitions coming from?

By the way, great job with this project!!! Also this is the first and only setup I could replicate on a blank project using Angular and Webpack... Really thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions