angular - C# errors in TypeScript files VS2017 -


i'm learning aspnetcore mvc angular2 , wrote model follows:

import { supplier } './supplier.model'; import { rating } './rating.model';  export class product {     constructor(         public productid?: number,         public name?: string,         public category?: string,         public description?: string,         public price?: number,         public supplier?: supplier,         public ratings?: rating[]) { } } 

which shows no errors, , there shouldn't be. if try build project get:

error cs0116 namespace cannot directly contain members such fields or methods sportsstore f:\projects\mvcng2\sportsstore\clientapp\app\models\product.model.ts

error cs1026 ) expected sportsstore f:\projects\mvcng2\sportsstore\clientapp\app\models\product.model.ts

error cs1002 ; expected sportsstore f:\projects\mvcng2\sportsstore\clientapp\app\models\product.model.ts

error cs1519 invalid token ',' in class, struct, or interface member declaration sportsstore f:\projects\mvcng2\sportsstore\clientapp\app\models\product.model.ts


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -