Hi Mo,

short version:

$http.get('engineers/all').success(function(data) { // let's load some data

                $scope.engineers = engineers; // ok, we get Data let's
render them on page, $scope.engineers is bound to template
                $('#bugsTable a:first').click(); // now I need to
click on created link, I expected that link was created on line above,
but it wasn't. So what is the right way to make "click" in this case?

});



2015-06-01 17:09 GMT+03:00 Mo Moadeli (CREDACIOUS) <[email protected]>:

> Could be a variation of things.  Please post a short plunker.
>
>
> On Monday, June 1, 2015 at 9:44:33 AM UTC-4, Michael Cherkasov wrote:
>>
>> Hi there,
>>
>> there's my code: https://gist.github.com/anonymous/8cb675d8accc3e970e63
>>
>> I load data via AJAX and populate the data to controller variable that is
>> bound to DOM, it should be rendered
>> to list of links, right after this I need to click the first link:
>>
>> loadEngineersList( function(engineers) {
>>     $scope.engineers = engineers; // data propagation
>>     $('#bugsTable a:first').click(); // click
>> });
>>
>> But clicking doesn't work, because link doesn't exists at this moment and 
>> model isn't rendered yet.
>>
>> I have on click event that loads other data, so what is right way to 
>> activate loading and link selection?
>>
>> Thanks,
>> Mikhail.
>>
>>
>>
>>
>>  --
> 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/Wbc-KHSQvaU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to