These are chat archives for angular/angular.js

8th
May 2018
hemanthunravel
@hemanthunravel
May 08 06:34
Hi guys I there a way to automate high chart in angular application using protractor
I need to manually hover on a point and click that point
Viktor Moskvych
@wouzar
May 08 07:15
@frederikprijck As far as I know I can't get access to the $scope variable inside the resolve function.
Frederik Prijck
@frederikprijck
May 08 07:16
Hence why i said "Not sure what you're trying to do".
@wouzar You can't get access to the scope in the resolve, neither can u before the route was "chosen".
But there's probably other ways to achieve what u wanna achieve.
And: you probably wanna avoid $scope.
Viktor Moskvych
@wouzar
May 08 07:19
I actually need to do $scope.ncyBreadcrumbIgnore=true, because that view causes bug with breadcrumbs on reload. The strange thing for me is that div with ui-view parameter already has ng-scope parameter, despite of the fact it hasn't been chosen yet.
And that scope is actually revealed in the debugger (I use ng-inspector). I tried to bind custom controller with ng-controller parameter, the sole purpose of which is to turn off breadcrumbs on this view. But I thought there could be clearer solution. Binding two controllers to the view seems like not a good idea.
Is it true that scope is been created before the route was chosen and controller was instantiated? Or maybe there is some other scope not relevant to ui-view?
Frederik Prijck
@frederikprijck
May 08 07:29
@wouzar I don't think scope is created before the route was chosen.
Why can't you put $scope.ncyBreadcrumbIgnore=true in your controller ?
Viktor Moskvych
@wouzar
May 08 07:31
Because the controller binded to the view is never been instantiated.
Frederik Prijck
@frederikprijck
May 08 07:32
And why is that ?
Anyway, create a plunkr as that might be alot easier to help you / understand what's going wrong.
Viktor Moskvych
@wouzar
May 08 07:33
Because I the problem occurs on the other route, there is just empty view (related to different route), which somehow has binded scope, which causes the problem
I'll try to reproduce it in plunker
Frederik Prijck
@frederikprijck
May 08 07:39
:thumbsup:
Tom McKearney
@tommck
May 08 15:18
Hmm... I'm wondering if this has reared its head again: angular/angular.js#15631..
I have code that is throwing an Error in a link function of a directive and it's getting swallowed (unit test's "toThrow()" is failing)
TEST:
expect(function () {
    console.log('1');
    $compile(elm)($rootScope);
    $rootScope.$digest();
    console.log('2');
}).toThrow();
code:
if (someCondition) {
    console.log('throwing');
    throw new Error('bad');
}
output:
LOG: '1'
LOG: 'throwing'
LOG: '2'
Chrome 66.0.3359 (Windows 7 0.0.0) ...

        Expected function to throw an exception.
Tom McKearney
@tommck
May 08 15:23
WTF?
@gkalpak , did you take out the code you put in for me before? :)
related: angular/angular.js#15629
George Kalpakas
@gkalpak
May 08 15:28
Not intentionally :grin:
Tom McKearney
@tommck
May 08 15:28
:D
huh.. tried to update my old plunker, but it's giving me a 503 error
George Kalpakas
@gkalpak
May 08 15:32
The code seems to still be there. Waiting for the repro :P
Tom McKearney
@tommck
May 08 15:32
dammit!
:)
with plnkr down, that's really annoying
:) I'm sure they'll fix things soon
George Kalpakas
@gkalpak
May 08 15:47
We still have StackBlitz. Just saying... :wink:
Tom McKearney
@tommck
May 08 15:52
well, the plunk is running now and I couldn't repro it with a super-simple version.. I'm double checking all my assumptions first
mattyicce
@mattyicce
May 08 21:20
If I make a API call and I get a response of status: 0 and data: null, is that angularjs returning that or express? This usually happens after a refresh