I wonder why $scope.allRO is empty although I have a success. Ohhhh, I
really don't want to get back to jQuery. Right, I will see if watching
brings any success.


On 2 May 2014 10:42, Constantinescu Nicolaie <kos...@gmail.com> wrote:

> I have tried to build the OpenLayers3 object inside success as you
> suggested.
> Unfortunately it doesn't work. The data, hmmm, is very stubborn. It really
> sticks to being a promisse?!
>
> By the time you chain a success, what is data by that time? Still a
> promise or the data representation?!
>
> I will try the $watch...
>
> If any of help I have packed the files. They are not much use without the
> MongoDB connection, but still.
>
>
> On 2 May 2014 08:54, Sander Elias <sanderel...@gmail.com> wrote:
>
>> Hi Constantinescu,
>>
>> By the time you can access your console, the data will be in. If you put
>> an console.log in the code, you will see it’s not there yet.
>> If you really must do it outside the success method, you can do it like
>> this:
>>
>> $scope.$watch('allRO',function (newdata) {
>>     var vectorSource = new ol.source.GeoJSON({
>>          object: $scope.allRO
>>     });
>> });
>>
>> This accomplish the same thing, but it takes some additional CPU cycles.
>>
>> Regards
>> Sander
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "AngularJS" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/angular/6h66_F6hKW8/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> angular+unsubscr...@googlegroups.com.
>> To post to this group, send email to angular@googlegroups.com.
>> Visit this group at http://groups.google.com/group/angular.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Constantinescu Nicolaie
> Information Architect
> http://www.kosson.ro
> Membru în BEX al ANBPR
> www.anbpr.org.ro <http://www.anbpr.org.r>
> Director
> http://sparceurope.org/
> Open Acces Understanding
> http://startad.kosson.ro
> Information Science Sonar
> http://sonar.kosson.ro
> digital curator for Nostrum Monumentum
> http://memoria.kosson.ro
>



-- 
Constantinescu Nicolaie
Information Architect
http://www.kosson.ro
Membru în BEX al ANBPR
www.anbpr.org.ro <http://www.anbpr.org.r>
Director
http://sparceurope.org/
Open Acces Understanding
http://startad.kosson.ro
Information Science Sonar
http://sonar.kosson.ro
digital curator for Nostrum Monumentum
http://memoria.kosson.ro

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to