javascript - How to access Angular 2 object's attribute -


export class dashboard {     checked: object = {users: false, device: false}     boxclicked(){         if(checked.users){             console.log("clicked users");         }     } } 

property 'users' not exist on type 'object'. why?

you saying checked: object = {users: false, device: false} means members defined 'object' (the interface) visible. can not access 'users'.

you should checked: = {users: false, device: false}


Comments

Popular posts from this blog

javascript - Why Selenium can't find an element that is graphically visible -

android - Basic camera in app -

scala - Using the kronecker product on complex matrices with scalaNLP breeze -