Category : angular

At the moment I have a service that should return the id and the name of the books: @Injectable({ providedIn: ‘root’, }) export class ApiFetcher { constructor(private http: HttpClient) { } async getBooksListNames() { let books = await this.http.get<Book[]>("https://www.anapioficeandfire.com/api/books").toPromise(); let booksNames = books.map(function (book) { return { name: book.name, id: book.url.substr(book.url.lastIndexOf("/") + 1) } }); ..

Read more

I had a different question which now lead me to this one here. My original question was this: Why is form: FormGroup showing ‘controls’ as undefined in an Angular11 component? So this piece (ngSubmit)="send(newMaterialFormGroup.value)"> should be changed to (ngSubmit)="send(newMaterialFormGroup)"> Doing so passes the object and thus allowing me to access controls successfully. But the question ..

Read more

I’m new to superset-ui and currently looking to use it in our Angular application, although this issue occurs for React as well. I just wanted to try out "@superset-ui/legacy-preset-chart-nvd3" components for now. To do that, I followed the usage given in https://github.com/apache-superset/superset-ui/tree/master/plugins/legacy-preset-chart-nvd3. I tried this with a new generated angular app using the cli. But ..

Read more

I am facing certain error with $event in angular 11. Please someone help me to debug it.. $event error in angular Error message : Error Message Error: src/app/recipes/recipes.component.html:4:26 – error TS2739: Type ‘Event’ is missing the following properties from type ‘Recipe’: name, description, imagePath 4 (recipeWasSelected)=”selectedRecipe=$event”></app-recipe-list> ~~~~~~~~~~~~~~~~~~~~~ src/app/recipes/recipes.component.ts:6:16 6 templateUrl: ‘./recipes.component.html’, ~~~~~~~~~~~~~~~~~~~~~~~~~~ Error occurs in ..

Read more

I have home component has a nav bar and inside the component div there is an other navbar. I want to open the link in this navbar to opened in the same div that contain that navbar. Couldn’t do it. Anyone who can help the code is like that: the app.compoent is <body class="bg-dark" > ..

Read more