typescript - Angular template not part of component -


in custom component:

import { component } '@angular/core';  @component({     selector: 'app-server',     templateurl: './server.component.html'  }) export class servercomponent{  } 

app.module.ts

import { browsermodule } '@angular/platform-browser'; import { ngmodule } '@angular/core'; import { formsmodule }      '@angular/forms'; //<-- formsmodule import import { appcomponent } './app.component';  import { servercomponent } './server/server.component'; //extension (ts) added web pack  @ngmodule({   declarations: [     appcomponent,     servercomponent   ],   imports: [     browsermodule,     formsmodule   ],   providers: [],   bootstrap: [appcomponent] }) export class appmodule { } 

error:

/src/app/server/server.component.ts (5,2): argument of type '{ selector: string; templateurl: string; }' not assignable parameter of type 'component'.   object literal may specify known properties, , 'templateurl' not exist in type 'component'. 

typescript tooling informed you, had typo in templateurl

templateurl 

should be

templateurl 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -