narasiman rao

narasiman rao

  • NA
  • 519
  • 768.7k

Error in angular 2 module not found: cant resolve '.app

Dec 6 2017 11:53 PM
File structure as follows
 
->src
->app
->appcomponent.css
->appcomponent.html
->appcomponent.spec.ts
->appcomponent.ts
 
i written the below code in visual studio code
 
App.component.ts code as follows
 
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
templateUrl: 'app/app.component.html'
})
export class AppComponent {
appTitle: string = 'Welcome';
appStatus: boolean = true;
}
 
app.component.html code as follows
 
<div *ngIf = "appStatus">{{appTitle}} Tutorialspoint
 
when i run in browser error as follows
 
ERROR in ./src/app/app.componenet.ts
 
Module not found: Error cant resolve '.app/app.component.html' in 'C:\users\1900055\tour\src\app
 
resolve './app/app.component.html' in 'C:\users\1900055\tour\src\app'
using description file: C:\users\1900055\package.json <relative path: ./src/app>
 
Field browser does not contain a valid false configuration.
 
what is the mistake in above code.
 
please help me

Answers (5)