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
Post a Comment