sky might be defined, but you are not assigning it a value before you are accessing it. Where are you assigning a value sky?
It is unclear if you mean that you are using Angular or if you mean you are using AngularJS. In the tags you have used the Angular tag. In the description you have mentioned AngularJS. These are two different things. You are also using $ which I assume is jquery. I suggest avoiding mixing jQuery with Angular or AngularJS. It will make your learning process much simpler.