Given the following TypeScript functions: public retrieveAllMembersIdsFromGroup(groupId: string): Observable<string[]> public retrieveMember(memberId: string): Observable<Member> How to combine this in one function to get all members (Observable)? public retieveAllMembersFromGroup(groupId: string): Observable<Member[]> For example I want to have something like this: public retieveAllMembersFromGroup(groupId: string): Observable<Member[]> { return this.retrieveAllMembersIdsFromGroup(groupId).pipe( map((membersIds: string[]) => { //some magic here to call this.retrieveMember(memberId) ..
Category : nested
Actually the angular project works in a iframe to embebed a angular project in html pages, and works well! http://localhost/example But my boss ask me to we can get more far. He takes the idea from youtube api, for a better and correct integration https://developers.google.com/youtube/iframe_api_reference As you can see youtube api do this: loads the ..
I have a component which have HTML inside looking like this: <div class="wrapper"> <lqs-myComponent class="my-component" [ngClass]="myComponentStatus ? ‘is-active’ : ”"></lqs-myComponent> </div> The CSS (or some of it) for this component is: .wrapper { .my-component { display: grid; width: 100%; justify-self: center; box-sizing: border-box; border-radius: 5px; row-gap: 5px; align-self: start; &.is-active { > div { transition: ..
I have this array : my_array = [ {model: "CF650-3C", color: {Orange: 3, Black: 2} }, {model: "HD4533F", color: {Black: 2, Orange: 1} } ] Those are objects in there that have .model and .color properties and I want to display them in a table so I need access to all .color values in there ..

I have got problem when I want to input data of nested class in html form, Example JSON { "id": 6, "firstName": "Joanna", "lastName": "Walec", "salary": 5000.0, "department": "Analytics", "vacation": false, "enabled": true, "address": { "id": 6, "zipCode": 57532, "street": "Angular", "number": 2, "city": "New York", "country": "USA" } } Ids are auto incremented relation ..
Say that since my project uses many tables, I decide to opt for making my own my-table component to lighten the templates where these are inserted. The tables all respect the same base structure, but with varied n of columns and the content of the cells could be simple values derived from the input data ..
What is a better alternative to simplify my nested code below? The code does work, but I do know that nested subscriptions aren’t good what I’ve read. I am also not sure if I should use mergeMap() or switchMap() in this particular example. private subscriptions: Subscription = new Subscription(); ngOnInit() { this.subscriptions.add(this._route.paramMap.subscribe((paramMap: ParamMap) => { ..
I am attempting to build a portal for navigating standalone Angular projects. The idea is to have a single main application: a simple sidebar which lists a varying number of Angular projects, and a div which will act as a container. Clicking a project in the sidebar will dynamically load that project into the container. ..
I have a Component, the selector is: app-common-component. The app-common-component based on an ngModelGroup : <fieldset ngModelGroup> </fieldset> I have a form, which separated to two components app-component-a and app-component-b <form> <app-component-a></app-component-a> <app-component-b></app-component-b> </form> The app-component-a contains the app-common-component <fieldset ngModelGroup="componenta"> <app-common-component></app-common-component> </fieldset> The app-component-b contains the app-common-component also <fieldset ngModelGroup="componentb"> <app-common-component></app-common-component> </fieldset> My question ..
i need some advice about angular-datatables, implemented to Angular 9. I have JSON return nested object array. Below is example data { "data" : "DocumentVM" : [ {ID:1, Name:"Document One"}, {ID:2, Name:"Document Two"}, {ID:3, Name:"Document Three"} ], "draw" : 1, "recordsFiltered" : 3, "recordsTotal" : 3 } This is my dashboard.component.ts and i use ngx-soap ..
Recent Comments