What is posts: any; just before the constructor()

It used to be var, then let, now what is :any ?

posts: any;

( I’m new to ionci2 )

image

@libertytrustgroup That means that you are declaring a variable called posts that is of any type (number, string, object) and you can call it from anywhere in your class (eg this.posts).

You should read tutorials on ionic2 so you can practice how to program in this framework with typescript.

You also should avoid using any as much as humanly possible. It subverts the compile-time type safety that is an important part of TypeScript.