Skip to main content
1 vote
0 answers
60 views

$rootScope.on is calling twice before destroy in angularjs

In this issue, first time it is coming into else block where downloadCsv method is getting called then rather destroy the component is again comes into if block. Somehow subscription has made twice in ...
anchal gaur's user avatar
1 vote
1 answer
388 views

Accessing rootScope variable in template view not working

I know this is possible and have seen many threads on how to do this but I can't figure out what I am doing wrong. My $rootScope variable is not appearing in my template view. .run(function($...
rolinger's user avatar
  • 3,196
-1 votes
3 answers
306 views

Async variable stored in $rootScope not available in other controllers

I am using Angular 1.x for my stack and when I make an API call and store the response in the $rootScope, it is not accessible in other controllers' view. My controller: angularApp.controller('...
Sean's user avatar
  • 1,341
0 votes
1 answer
60 views

Angular JS 1.x - Can't pass $rootScope variable into next function

I have a simple issue I can't seem to crack. It seems like a variable in $rootScope isn't assigned when I call the next function but isn't that the point of a Promise (.then)? My stack is AngularJS ...
Sean's user avatar
  • 1,341
0 votes
2 answers
116 views

Adding and deleting rows from one table to another - AngularJS

Our team is developing in ServiceNow and have a requirement to add rows from "Sending" table to "Receiving" table and delete rows from the "Receiving" table and return it back to the "Sending": We've ...
Dave's user avatar
  • 1,277
0 votes
0 answers
145 views

passing data to another controller using $rootScope.$broadcast

its like signup menu first controller gets the data from the user and after the validation it sends the data to $rootScope and broadcast it so the second controller can get it and show the data in ...
sirH's user avatar
  • 83
3 votes
2 answers
2k views

AngularJS $rootScope.$on alternative in context of migration to Angular2

Our AngularJS project had start it's long way to the modern Angular. The ngMigration util recommend me to remove all the $rootScope dependecies because Angular doesn't contain a similar concept like $...
kirill.login's user avatar
0 votes
1 answer
130 views

AngularJS rootScope.$emit from within Directive

I have a directive for users to like (or "fave") posts in my application. Throughout my controllers I use $rootScope.$emit('name-of-function', some-id) to update user data when they like a new post, ...
Leon's user avatar
  • 1,889
0 votes
1 answer
186 views

Use UI-router to navigate to fromState

AngularJS UI-router has a useful parameter "fromState" which allows me to store where the user came from when they change state. I am trying to implement a system which takes the user back where they ...
Leon's user avatar
  • 1,889
0 votes
0 answers
26 views

Is the rootScope same or not the same if I open two identical angularjs app?

I developed a single page website with the AngularJS framework.My website will receive logs from other servers and render them on the page. When I open two identical pages of my app in the same ...
21detective's user avatar
0 votes
2 answers
45 views

Value from $rootScope is not loaded properly

So I'm basically trying to get a property from my $rootScope when the page loads. I need this property so I can display the value in my form. After testing this: console.log("DEBUG $rootScope", $...
Jordec's user avatar
  • 1,564
0 votes
1 answer
1k views

ServiceNow: issue with recordWatch and $rootscope timing

Our team is developing an application in ServiceNow. We have a recordWatch on a widget that updates dynamically, but we also want to use rootscope to broadcast data to another widget and have ...
Dave's user avatar
  • 1,277
0 votes
1 answer
79 views

Propagating Scope Events from a Factory

Neither $rootScope.$broadcast nor $rootScope.$emit is working from my factory I have $rootScope injected into the factory. The factory returns this function: alertHook: function() { $rootScope.$...
MMelvin0581's user avatar
0 votes
2 answers
637 views

How to call an Angular method when browser closes

I'm relatively new in AngularJS and I have been asked to modify our application so that when the user closes the browser, we also log them out of Auth0 service. I have the code below but I can't get ...
RealSollyM's user avatar
  • 1,540
0 votes
0 answers
36 views

AngularJs : How to know if an URL's change is from adress bar or from component action

I'm creating an AngularJs web app and I need to know if an user enter an url in the address bar. In this case I will destroy the current context to initiate a new one. I tried to use the $rootScope.$...
Escdemon's user avatar

15 30 50 per page
1
2 3 4 5
11