javascript - Angularfire bindTo for subobjects -
i have construction userdatas under $rootscope.myuserdata, like: $rootscope.myuserdata.basicdata, $rootscope.myuserdata.ac, trying optimize queries through firebase.
the problem if want bind them nicely under $rootscope.myuserdata - subobjects, cant this:
$rootscope.myuserdata.basicdata = $firebase( new firebase(resourceurl) ).$asobject(); $rootscope.myuserdata.basicdata.$bindto($rootscope.myuserdata, "basicdata"); for illustration should work fine:
$rootscope.basicdata = $firebase( new firebase( resourceurl ) $rootscope.basicdata.$bindto($rootscope, "basicdata"); if understand correctly, have bind straight rootscope , can't bind e.g. $rootscope.myuserdata.basicdata.
is there way around problem, using construction have $rootscope.myuserdata subobjects or solution alter construction i.e. $rootscope.myuserdata_basicdata?
javascript firebase angularfire
No comments:
Post a Comment