I am confuse about how angular scope works!!!
I am passing two variable to one template using ng-init and onLoad. Both variable value accessed from template but there is one controller which I have bound to that template. I am thinking why both variable prints its value from template but prints undefined (onLoad varibale) while accessing from controller.
Fiddle illustrating my problem
jsFiddle
What I understand is, when we pass variable using ng-init, it creates that variable inside current scope but what for that variable which is passed by onLoad??
Please tell me how it exactly works.
Thank you.