Reputation:
I need some help. I'm playing with basics of Angular2 and TypeScript as a part of my switch from A1 to A2 so something here might be obvious for you.
I have a this situation:
AppConfigConst
holds some static, app wide configuration data.AppConfigurationInjectable
takes AppConfigConst
and exposes simple API to access configuration data.SelectedLanguageInjectable
want's to use method from AppConfigConst
and here I get this:ERROR in [default] C:_DEV\XXX\src\app\shared\selected-language\selected-language.injectable.ts:9:46 Property 'getSupportedUiLanguages' does not exist on type 'typeof AppConfigurationInjectable'.
Upvotes: 3
Views: 2364
Reputation: 40647
You have a mistake in your constructor. It should be:
constructor(private appConfiguration: AppConfigurationInjectable){
change =
with :
:
is for defining types in typescript =
is for setting a value as you know.
Upvotes: 5