TypeScript Build Error : Property does not exist on type ‘IStateParamsService’


Typescript prefers to work on maps explicitly through brackets notation [].

If you want to get a field out of a map-like object you should use square brackets instead of dot notation:

if (this.param['courseId'] === "00000....0000") {
  //.. rest of the code

That should solve the immediate issue you’re facing.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s