JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
Wax
Mar 21, 2019 10:53
lol
Wax
Mar 21, 2019 10:51
thanks for the conole log idea lol, always forgetting to do that,
Wax
Mar 21, 2019 10:51
it's because of this
Wax
Mar 21, 2019 10:51
#AC17BF132.48%)
Wax
Mar 21, 2019 10:51
oh crap it's working now
Wax
Mar 21, 2019 10:50
ohh, I think i need some space
Wax
Mar 21, 2019 10:50
Object { "background-image": "-moz-linear-gradient(151.91deg, #3C0F6A 17.62%, #AC17BF132.48%)" }
Wax
Mar 21, 2019 10:46
hmm, that's how it showed .
Wax
Mar 21, 2019 10:45
{'background-image': '-moz-linear-gradient(151.91deg, '+ (this.currentCabin.overlayGradientColors[0]) + ' 17.62%, ' + (this.currentCabin.overlayGradientColors[1]) + '132.48%)'}
Wax
Mar 21, 2019 10:45
if i were to console.log it, i'll put it in component and add the this reference?
Wax
Mar 21, 2019 10:44
hmm it's in the template
Wax
Mar 21, 2019 10:43
i'll try
Wax
Mar 21, 2019 10:38
oh btw am using ngstyle of angular
Wax
Mar 21, 2019 10:38
"overlayGradientColors": ["#3C0F6A", "#AC17BF"]
Wax
Mar 21, 2019 10:36
or am i concatenating it wrong
Wax
Mar 21, 2019 10:36
Color won't display
Wax
Mar 21, 2019 10:36
What's wrong here
Wax
Mar 21, 2019 10:36
{'background-image': '-moz-linear-gradient(151.91deg, '+ currentCabin.overlayGradientColors[0] + ' 17.62%, ' + currentCabin.overlayGradientColors[1] + '132.48%)'}
Wax
Feb 7, 2019 08:15
In JS, I have several fields in my angular template where I will show a couple of texts, these text have their own respective properties in an object. obj.data.nameText for example. My templte has several of these. My question is how do I code this in a way where it won't produce errors for accessing non-existing parameters incase of having an undefined object (i.e, not able to retrieve from backend)
Wax
May 14, 2018 08:38
instead of it becoming bold.
Wax
May 14, 2018 08:38
so far it's outputting things like this <b>lorem ipsum</b>
Wax
May 14, 2018 08:37
How do I make it render properly?
Wax
May 14, 2018 08:37
I'm trying to create a simple blog function on my angular project where I can enter things with html tags like <b>
Wax
May 14, 2018 08:37
Hi.
Wax
Feb 22, 2018 03:32
@Rick Alright. thanks
Wax
Feb 22, 2018 03:31
<div accordion-heading> I'm kinda new to angular, but why is there an accordion-heading in this element? Is it a directive?
Wax
Feb 22, 2018 03:31
@Rick and just grab one of them to test the click event?
Wax
Feb 22, 2018 03:25
I tried googling it but I'm not sure I f I'm entering the right keywords to make em results pop out
Wax
Feb 22, 2018 03:25
by loops and other events
Wax
Feb 22, 2018 03:25
but not sure how to do it on dynamically generated elements
Wax
Feb 22, 2018 03:25
is what I use for static dom elements
Wax
Feb 22, 2018 03:24
the
let button = fixture.debugElement.nativeElement.querySelector('button');
Wax
Feb 22, 2018 03:24
that's what I tried so far
Wax
Feb 22, 2018 03:24
Wax
Feb 22, 2018 03:21
how do I unit test a click event on an element that was generated by a loop?
Wax
Feb 4, 2018 09:14
and will fail after a couple of minutes
Wax
Feb 4, 2018 09:14
stuck on pending
Wax
Feb 4, 2018 09:14
My post request is taking forever
Wax
Feb 4, 2018 09:14
anyone familiar with mongoose and mongodb
Wax
Feb 4, 2018 09:13
hi
Wax
Jul 28, 2017 03:42
aw man, i'd read some redex.
Wax
Jul 28, 2017 03:41
Hmm, let's say I used the ^ as the index and then get the range 6
Wax
Jul 28, 2017 03:38
when i wear retainers. yup
Wax
Jul 20, 2017 07:52
:(
Wax
Jul 20, 2017 07:52
Like for example, I have a search results list generated, and I want to update it based on the user query input.
 

Trash can

Like the recycle bin, but trashier.
Wax
Feb 22, 2018 03:23
`it('should call onFooterClick on click', async() => {
let isOpening = true;

spyOn(component, 'onFooterClick').and.callThrough();

let button = fixture.debugElement.nativeElement.querySelector('button'); // this is what i use on static dom elements

button.click();

fixture.whenStable().then(() => {
expect(component.onHeaderClick).toHaveBeenCalled();
});
});`
 

HTML / CSS / WebDesign

This room is now defunct. RIP.
Wax
Jan 4, 2018 08:55
Do you just create an integer version of it and simply maintain the integrity of your system's liquidity?
Wax
Jan 4, 2018 08:54
Like for example, a payment gateway paid you to put their money online
Wax
Jan 4, 2018 08:54
How do you guys represent money in your system?
Wax
Jan 4, 2018 08:54
Hello guys, I have a question.