So I’m using typescript in Angular and I have this code in ngOnInit() :
but I’m getting this error: [ ‘:’ expected.ts(1005) ].
I wanna use the new way to make if else statement (with ‘?’ operator).
so maybe someone knows how to make it without else ‘:’ statement.
Source: Angular Questions
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Our dedicated development team is here for you!
We can help you find answers to your question for as low as 5$.