by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 10:45
    Abufarhah starred angular/angular
  • 10:44
    aaronpnp starred angular/angular
  • 10:33
    sonukapoor commented #37930
  • 10:31
    sonukapoor closed #37275
  • 10:31
    sonukapoor commented #37275
  • 10:22
    sonukapoor commented #37975
  • 10:18
    sonukapoor assigned #37975
  • 10:14
    sod commented #36306
  • 10:05
    iceebajs starred angular/angular
  • 09:57
    sod commented #37904
  • 09:50
    debojyoti-majumder starred angular/angular
  • 09:43
    petebacondarwin closed #37998
  • 09:43
    petebacondarwin commented #37998
  • 09:37
    ngbot[bot] milestoned #37996
  • 09:37
    ngbot[bot] milestoned #37996
  • 09:37
    petebacondarwin labeled #37996
  • 09:37
    petebacondarwin labeled #37996
  • 09:36
    petebacondarwin edited #37996
  • 09:35
    ngbot[bot] milestoned #37995
Goutam
@goutamdh
is there any other communities as your in knowledge? . please kindly give me the link I will ask there
@frederikprijck
Frederik Prijck
@frederikprijck
I am not familiar with WASM or any of it's communities.
Goutam
@goutamdh
please add me there
user name-LimboCode
Frederik Prijck
@frederikprijck
U can just join that server ...
Goutam
@goutamdh
Thank you
@frederikprijck
Omid Dehghan
@odchan1_twitter
Hey folks,
Can anyone explain to me why the code below does not display HEX to a user?
<!DOCTYPE html>
<html>
<head>
   <title>CSS is fun :)</title>

  <style type="text/css">

  </style> 

</head>
   <body>
      <p id = "box" style="width: 400px; height: 200px; border: double;"></p>
      <label for="red">Red</label><input type="range" name="range" id = "red" min="0" max= "255">
      <label for="green">Green</label><input type="range" name="range" id = "green" min="0" max= "255">
      <label for="blue">Blue</label><input type="range" name="range" id = "blue" min="0" max= "255">
      <p id="p1"></p>
      <p id = "p2"></p>
      <p id = "p3"></p>
      <p id="hex"></p>

      <script type="text/javascript">
         (function(){
            let rangeGreenElement = document.getElementById("green"); 
            let rangeRedElement = document.getElementById("red");
            let rangeBlueElement = document.getElementById("blue");

            let greenPElement = document.getElementById("p2");
            let bluePElement = document.getElementById("p3");
            let redPElement = document.getElementById("p1");

            let box = document.getElementById("box");

            let redColor = rangeRedElement.value; 
            let greenColor = rangeGreenElement.value;
            let blueColor = rangeBlueElement.value;

            rangeGreenElement.addEventListener("input",()=>{
               greenColor = rangeGreenElement.value;
               greenPElement.innerText = greenColor;
               placeColor();
            });
            rangeRedElement.addEventListener("input",()=>{
               redColor = rangeRedElement.value;
               redPElement.innerText = redColor;
               placeColor();
            });
            rangeBlueElement.addEventListener("input", ()=>{
               blueColor = rangeBlueElement.value;
               bluePElement.innerText = blueColor;
               placeColor();
            })
            let hexDisplay = document.getElementById("hex");
            function placeColor(){
               let hexr = redColor.toString(16);
               let hexg = greenColor.toString(16);
               let hexb = blueColor.toString(16);

               hexr = hexr.length ==1 ? '0'+hexr:hexr;
               hexg = hexg.length ==1 ? '0'+hexg:hexg;
               hexb = hexb.length ==1 ? '0'+hexb:hexb;

               hexDisplay.innerText = "Hex value: "+ "#"+hexr+hexg+hexb;

               box.style.backgroundColor = 'rgb('+redColor+','+greenColor+','+blueColor+')';
            }
         })();

      </script>
   </body>
</html>
Frederik Prijck
@frederikprijck
I see no angular in it.
Omid Dehghan
@odchan1_twitter
@frederikprijck it's pure JavaScript. I didn't use Angular
BertrandMarechal
@BertrandMarechal
and it's the angular gitter
Frederik Prijck
@frederikprijck
Then why join an angular support channel
:joy:
BertrandMarechal
@BertrandMarechal
but anyhow, my bet would be on the logic in the following code
Omid Dehghan
@odchan1_twitter
@frederikprijck @BertrandMarechal is it illegal asking a question about JavaScript in this channel?
BertrandMarechal
@BertrandMarechal

               hexr = hexr.length ==1 ? '0'+hexr:hexr;
               hexg = hexg.length ==1 ? '0'+hexg:hexg;
               hexb = hexb.length ==1 ? '0'+hexb:hexb;

               hexDisplay.innerText = "Hex value: "+ "#"+hexr+hexg+hexb;
not illegal (yet), but you can find that hater's gonna hate
Frederik Prijck
@frederikprijck
Hey, I'm no hater :(
Omid Dehghan
@odchan1_twitter
@BertrandMarechal anyway do you know what's wrong with the code?
BertrandMarechal
@BertrandMarechal
what result do you get on the page ?
Omid Dehghan
@odchan1_twitter
Well, this portion of the code hexDisplay.innerText = "Hex value: "+ "#"+hexr+hexg+hexb; suppose to give me the hex version of RGB color but I'm getting RGB instead.
@BertrandMarechal did you run the code? do you see the same problem as I have?
BertrandMarechal
@BertrandMarechal
nops, no time to run the code :running:
Frederik Prijck
@frederikprijck
But where are u converting the RGB values to hex ?
Omid Dehghan
@odchan1_twitter
@frederikprijck
function placeColor(){
               let hexr = redColor.toString(16);
               let hexg = greenColor.toString(16);
               let hexb = blueColor.toString(16);

               hexr = hexr.length ==1 ? '0'+hexr:hexr;
               hexg = hexg.length ==1 ? '0'+hexg:hexg;
               hexb = hexb.length ==1 ? '0'+hexb:hexb;

               hexDisplay.innerText = "Hex value: "+ "#"+hexr+hexg+hexb;

               box.style.backgroundColor = 'rgb('+redColor+','+greenColor+','+blueColor+')';
            }
Frederik Prijck
@frederikprijck
That's not converting it to hex ?
image.png
BertrandMarechal
@BertrandMarechal
it is if it is an integer
image.png
image.png
Frederik Prijck
@frederikprijck
Apparantly range outputs a string.
Omid Dehghan
@odchan1_twitter
@frederikprijck @BertrandMarechal
The function works fine when I'm using it alone but within this source code it fails.
Frederik Prijck
@frederikprijck
So U might want to use greenColor = Number(rangeGreenElement.value);
Omid Dehghan
@odchan1_twitter
Wait a sec
Frederik Prijck
@frederikprijck
It works fine.
Omid Dehghan
@odchan1_twitter
@frederikprijck You are right, Range output is string. I fixed it. Thanks
Frederik Prijck
@frederikprijck
:thumbsup:
Timothy Alcaide
@timothyalcaide
ng lint —staged option still doesn't exist ? Do you have an alternative to lint only staged files ? :)
Manuele Dones
@manueledones
I used lint-staged but then it stopped working cause of angular-cli I suppose
Hi guys, I just updated my application to angular 10, everything's fine, but if I enable "strict": true I got a lot of errors regarding type incompatibility around Observable<TypeA> with Observable<TypeB> where TypeB extends TypeA
like: Type 'Observable<Event>' is not assignable to type 'Observable<KeyboardEvent>'.
Manuele Dones
@manueledones
any ideas?
mySubject: BehaviorSubject<boolean> = new BehaviorSubject(false); raises:
Type 'Observer<false>' is not assignable to type 'Observer<boolean>'.
Liviu Lupei
@liviulupei
Hi everyone, I'm working in the team who created Endtest.
I've dealt with all the possible corner cases for testing Angular apps, I've join this channel to help others.
https://endtest.io
VuppalaMahesh
@VuppalaMahesh
Hi all. I need a help.
Hope everyone is doing good. The help which I need is, We use Angular in our many Projects and I want to include my organization in Angular website list of companies who are using their technology. Just want to know if Angular is allowing that way. If yes, Please let me know how to that. Below is the sample link of Elixir Technology using companies list in their website: https://elixir-companies.com/en/companies