What are you performing in first controller call. Are you updating any
model there ? you can call a service or factory from the success function.
On Thursday, 16 July 2015 15:11:39 UTC+5:30, Yugander Reddy wrote:
>
> I have written ajax call and want to call a controller which is in a
> different js file in suucess of ajax. Any help will be highly appreciated.
>
> controller1.js has firstcontroller, controller2.js has secondcontroller. I
> have an ajax call inside the secondcontroller to submit a form data to db
> table. When I get success response I am not able to call the
> firstcontroller to load the table with the new data.
>
> I tried the below code in success.
>
>
> angular.element(document.getElementById('firstControllerId')).scope().controller;
>
--
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.