Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 14:52
    devversion synchronize #43431
  • 14:43
    renovate[bot] edited #43411
  • 14:37
    crisbeto commented #43281
  • 14:37
    devversion synchronize #43431
  • 14:27
    crisbeto commented #43281
  • 13:54
    crisbeto synchronize #43281
  • 13:42
    crisbeto synchronize #43281
  • 13:16
    mcalmus commented #43416
  • 12:56
    mmuscat edited #43504
  • 12:53
    mmuscat edited #43504
  • 12:53
    crisbeto synchronize #43281
  • 12:48
    mh0 edited #43503
  • 12:45
    mmuscat edited #43504
  • 12:42
    JoonhunLee starred angular/angular
  • 12:42
    mmuscat opened #43504
  • 12:37
  • 12:36
    crisbeto synchronize #43281
  • 12:34
    crisbeto edited #43281
  • 12:34
    crisbeto synchronize #43281
  • 12:27
    mh0 edited #43503
Miloš Lapiš
@mlc-mlapis
@Aishasadat123 I mean the result of: console.log('... adding Type property:', facility);
Aishasadat123
@Aishasadat123
... data type: string
... adding Type property
Miloš Lapiš
@mlc-mlapis
@Aishasadat123 Nothing for both syntax: facility.Type = 'NPM'; or facility['Type'] = 'NPM';?
Aishasadat123
@Aishasadat123
it show this
for both show same result
Miloš Lapiš
@mlc-mlapis
@Aishasadat123 console.log('... adding Type property:', facility); shows only ... adding Type property: and nothing for facility?
@Aishasadat123 Then print also:
const facility = facilities[i];
console.log('... original content:', facility);
Aishasadat123
@Aishasadat123
it show facilities
Miloš Lapiš
@mlc-mlapis
@Aishasadat123 And after adding facility['Type'] = 'NPM'; it shows nothing?
Aishasadat123
@Aishasadat123
when i run the it also shows the facilities
i think i made you confused
can you please run it on your pc ?
if you want i will send the json file
ok?
Miloš Lapiš
@mlc-mlapis
OK. I can do it later. So put that JSON example here.
Aishasadat123
@Aishasadat123
ok
can i send in private message ?
santoshfurtado
@santoshfurtado

Hi Guys,

Could you please help me on the angular SSR with base ref deployment issue?
I am able to load the application without SSR with base ref but I am getting below issue with SSR & base href

Error : Failed to load module script: The server responded with a non-JavaScript MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec

I have also tried setting the type to type="text/javascript" but it also throws Unexpected token <

01.png
02.png
Ashref
@Asher2016
hello , i have issue when router.navigate(['../']) doesn't work because i have object/iframe loading html page
so this the code
@Component 
turnBack(){
      this.router.navigate(['../'], {relativeTo: this.activatedRouter})
    }

@HTML
<object [data]="urlSafe" type="text/html"
        width="800" height="1200" typemustmatch>
</object>
WahidN
@WahidN
How can I intercept a route change?
jyoti singh
@jyotisingh144

I need to change parent's components heading as per child Component's heading through router outlet. How can I do that?

Sample structure
in parent Component.ts
title = ""

In parent Component.html
{{title}}

<router-outlet></router-outlet>

in child component.ts
title = "Login"

I want to get this child's component title in parent component

Ashref
@Asher2016
Guys , any advice how to add param to route when it change or leave the actual component ?
StephenS
@S-Stephen
Hi Everyone, I'm considering configuring a multi-project repo. I realise that the nx tools exist but wandered how far I can get with the standard angular-cli setup. Indeed I would rather not have to really on a further tool beyond angular cli. I've read that Angular CLI supports multi project repos :https://angular.io/guide/file-structure#multiple-projects. However I'm after information of how to configure build and test of these atomically (along with how to transition from a traditional angular CLI repo). I was wandering whether any of you friendly folk may have written an article on this (accessible if not registered on medium) or indeed have any tips?
Miloš Lapiš
@mlc-mlapis
@S-Stephen Most of such projects probably used Nx monorepo, which extended the original base used in CLI and add many new features.
StephenS
@S-Stephen
Thanks @mlc-mlapis any idea what the 'road map' is for Nx. Will I at some stage need a license etc?
Miloš Lapiš
@mlc-mlapis
@S-Stephen Start here https://nx.dev and it's free.
StephenS
@S-Stephen
@mlc-mlapis thanks that's where I am :-) at the moment I can't see anything that assures me it will be free in perpetuity :-(. pretty daunting atm, but I'll give it a go I guess!
Miloš Lapiš
@mlc-mlapis
@S-Stephen Maybe here https://nrwl.io/products
StephenS
@S-Stephen
ty @mlc-mlapis
Ghost
@ghost~5fa3e8c4d73408ce4ff35859
hi
Liveloper
@liveloper
hello, anybody knows how can i use jest and karma together in an angular project?
1 reply
mohammadzbggo
@mohammadzbggo
Hi how does the navigationExtras(Angular Router) work to receive updates? Let's say I have a route loaded with an initial state. After some time I receive updates from a backend source. How do the updates get transferred? We can talk about it from high-level perspective.
Miloš Lapiš
@mlc-mlapis
@mohammadzbggo How do you receive that update on a client side?
4 replies
mogo-edenpark
@mogo-edenpark

Hi, guys, how do I wait for functions?

async function warnDuplicateContainerNumber() {
                    let valid = true;
                    let legs = [];
                    $scope.model.legs.map(function (leg, index) {
                        return orderContainerCreateService.warnDuplicateContainerNumber(leg.containerNumber).then(function (response) {
                            if (response.status == 200) {
                                valid = response.data.valid;
                                if (!valid) {
                                    legs.push(index + 1);
                                }
                            }
                        });
                    });
                    await Promise.all(allPromise);
}

let needToWait = await warnDuplicateContainerNumber();

I need to wait all of that and need to use that value to do a certain procedure

Miloš Lapiš
@mlc-mlapis
@mogo-edenpark But async / await is about making an async operation to be a sync one.
Miloš Lapiš
@mlc-mlapis
@mogo-edenpark You have to respect the pattern:
async function a (...) {...}
async function b () {
   const result = await a(...);
   return result;
}
const result = b(...);
mogo-edenpark
@mogo-edenpark
but I want to wait.. like this
const result = await (b...);
then... depending on the result, I want to continue..
Miloš Lapiš
@mlc-mlapis
@mogo-edenpark Wait for what?
mogo-edenpark
@mogo-edenpark
wait for the result.. by excecuting the b function..
Miloš Lapiš
@mlc-mlapis
@mogo-edenpark ... The await keyword can only be used within async functions.
mogo-edenpark
@mogo-edenpark
conceptually..
const result = await b();
if(result.data)
{}
@mlc-mlapis Yes, you await a method await a, then why you can't wait await b ?
Miloš Lapiš
@mlc-mlapis
@mogo-edenpark So, the calling b(...) above synchronously call a(..) and returns a result.
@mogo-edenpark And b(..) is a synchronous code, isn't it?
mogo-edenpark
@mogo-edenpark
it's synchronous call, but the we have a keyword async which make me confused. That's why we have to deal with b as with then