Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ion-input type="text" placeholder="Enter a Town, Province or City" name="newPlace" [(ngModel)]="newPlace" id="empty"></ion-input>
- <button ion-button block type="submit" (click)="addLocation()">ADD AND SAVE MORE LOCATIONS</button>
- addLocation(){
- if( document.getElementById('empty').value === '' ){
- alert('empty');
- }
- }
- <button ion-button block type="button" (click)="addLocation()">ADD AND SAVE MORE LOCATIONS</button>
- <button ion-button block type="button" (click)="addLocation(newPlace)">ADD AND SAVE MORE LOCATIONS</button>
- addLocation(newPlace){
- if(newPlace === '' ){
- alert(newPlace);
- }
- }
Add Comment
Please, Sign In to add comment