Tuesday, 12 December 2017
Part 12 how to use alerts in ionic
in this video, i will show you that how you can use alerts in you ionic application.
Alerts are a great way to offer the user the ability to choose a specific action or list of actions. They also can provide the user with important information, or require them to make a decision (or multiple decisions).
From a UI perspective, Alerts can be thought of as a type of “floating” modal that covers only a portion of the screen. This means Alerts should only be used for quick actions like password verification, small app notifications, or quick options. More in-depth user flows should be reserved for full-screen Modals.
step 1 first import this in your page:
import { AlertController } from 'ionic-angular';
step 2 inside class constructor create instance
export class MyPage {
constructor(public alertCtrl: AlertController) {
}
step 3 create method and call inside button
showAlert() {
let alert = this.alertCtrl.create({
title: 'dotnetlab!',
subTitle: 'notification from dotnetlab',
buttons: ['OK']
});
alert.present();
}
}
step 4 call inside button
<button ion-button (click)="showAlert()">click me</button>
====================================================
to download full source code and presentation visit our wesite and Blog
website : - http://dotnetlab.in/
source code : - https://github.com/rahuljograna
facebook page :- https://www.facebook.com/DotnetLab-1896440207343189/
visit my blog : - http://aspnetinhindi.blogspot.in
follow me on twitter : https://twitter.com/THEJOGRANA
Subscribe to:
Post Comments (Atom)
Part 20 consuming rest api in ionic
in this video, I will show you that how you can consume the rest API. in the previous video we have implemented the asp.net web API projec...
-
ASP.NET Supports all Browsers The Best advantage of ASP.NET is all Browsers supports . One of the greatest challenges web developers ...
-
SQLDataAdapter DataAdapter serves as a bridge between a DataSet and SQL Server for retrieving and saving data. We can use SqlDataAdapte...
-
in this video, I will show you that how you can create loading component in your ionic application. The Loading component is an overlay t...
No comments:
Post a Comment