someService.moo will be called with a null value since the controller can’t find the foo variable which is in the childscope created by ionic. doesn’t this defeat the whole angular 2 way data binding idea?
thanks for clearing this up for me. I did create the variables i wanted to use in my views in my controller first most of the time which is why I never came across this error until now. Also if I didn’t do it then I probably never had a situation with a childScope which would have made me aware.
So I guess I better stick to my (personal?) practice of having an init function in my controller which is called when loaded and that instantiates all variables I later use in my view. This also helps me keep a good overview of all the variables I have.