Nisha Patel
Problem
I have a bootstrap 5 modal that I am trying to close from typescript. When I call the function to close it. I get an error that saying undfined when the dismiss function is called.
HTML
Solution
You need use "flat arrow" in subscribe so, the scope will be the component
NOTE1:there's no "let-d dismiss",
Inside the template you use
NOTE2: use
Remember, Angular creates a directory, in this directory there are the index.html and a copy of your assets folder. It's from this folder where Angular looks for the "images.”
Suggested blogs:
>Why Typescript does not allow a union type in an array?
>Narrow SomeType vs SomeType[]
>Create a function that convert a dynamic Json to a formula in Typescript
>How to destroy a custom object within the use Effect hook in TypeScript?
>How to type the values of an object into a spreadsheet in TypeScript?
>Type key of record in a self-referential manner in TypeScript?
>How to get the last cell with data for a given column in TypeScript?
>Ignore requests by interceptors based on request content in TypeScript?
>Create data with Typescript Sequelize model without passing in an id?
>How to delete duplicate names from Array in Typescript?