Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

hide element when pressing button angular

<div class="yourCssClass" *ngIf="this.isButtonVisible" (click)="this.isButtonVisible = false">
...
</div>

Your TypeScript

export class AppComponent {
   private isButtonVisible = true;
}
Comment

Hide angular element on button click

<button (click)="isShowInfo = !isShowInfo">Toggle me</button>

<div *ngIf="isShowInfo">
   <p>Here is my info</p>
</div>
Comment

PREVIOUS NEXT
Code Example
Javascript :: add decimals javascript 
Javascript :: js window onload 
Javascript :: js add function to array 
Javascript :: ajax data not reflecting after refresh particular div jquery 
Javascript :: read image metadata javascript 
Javascript :: how to tell what page you are on shopify liquid 
Javascript :: event.currenttarget 
Javascript :: moment diff 
Javascript :: javascript return string 
Javascript :: js get all arguments from function 
Javascript :: store with redux-thunk 
Javascript :: display time and date in javascript 
Javascript :: react alice carousel 
Javascript :: string splice javascript 
Javascript :: password validation in regex 
Javascript :: how to change background color using js 
Javascript :: Object of type * is not JSON serializable 
Javascript :: async function javascript 
Javascript :: convert a date into timestamp in javascript 
Javascript :: js push array into array 
Javascript :: how to install chalk in node js 
Javascript :: delete element javascript 
Javascript :: 7) Change cursor:pointer at checkboxes in java script 
Javascript :: angular implementing Validator 
Javascript :: datepicker min max date 
Javascript :: get url of website javascript 
Javascript :: how to use a regex expression in kibana query 
Javascript :: how to make a github api using react 
Javascript :: add next to react 
Javascript :: react iterate over map 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =