docs(documentation): cosmetically improve the documentation

This commit is contained in:
Ken Sodemann
2017-09-25 21:37:41 -05:00
parent 4a71786684
commit ff7b05ed23
9 changed files with 26 additions and 35 deletions

View File

@ -39,10 +39,10 @@ import { Config } from '../../config/config';
*
* export class MyClass{
*
* constructor(public actionSheetCtrl: ActionSheetController) {}
* constructor(public actionSheetCtrl: ActionSheetController) { }
*
* presentActionSheet() {
* let actionSheet = this.actionSheetCtrl.create({
* const actionSheet = this.actionSheetCtrl.create({
* title: 'Modify your album',
* buttons: [
* {
@ -115,14 +115,14 @@ import { Config } from '../../config/config';
* out first, *then* start the next transition.
*
* ```ts
* let actionSheet = this.actionSheetCtrl.create({
* const actionSheet = this.actionSheetCtrl.create({
* title: 'Hello',
* buttons: [{
* text: 'Ok',
* handler: () => {
* // user has clicked the action sheet button
* // begin the action sheet's dimiss transition
* let navTransition = actionSheet.dismiss();
* const navTransition = actionSheet.dismiss();
*
* // start some async method
* someAsyncOperation().then(() => {

View File

@ -51,12 +51,10 @@ import { Config } from '../../config/config';
* ```ts
* import { AlertController } from 'ionic-angular';
*
* constructor(private alertCtrl: AlertController) {
*
* }
* constructor(private alertCtrl: AlertController) { }
*
* presentAlert() {
* let alert = this.alertCtrl.create({
* const alert = this.alertCtrl.create({
* title: 'Low battery',
* subTitle: '10% of battery remaining',
* buttons: ['Dismiss']
@ -65,7 +63,7 @@ import { Config } from '../../config/config';
* }
*
* presentConfirm() {
* let alert = this.alertCtrl.create({
* const alert = this.alertCtrl.create({
* title: 'Confirm purchase',
* message: 'Do you want to buy this book?',
* buttons: [
@ -88,7 +86,7 @@ import { Config } from '../../config/config';
* }
*
* presentPrompt() {
* let alert = this.alertCtrl.create({
* const alert = this.alertCtrl.create({
* title: 'Login',
* inputs: [
* {
@ -181,14 +179,14 @@ import { Config } from '../../config/config';
* out first, *then* start the next transition.
*
* ```ts
* let alert = this.alertCtrl.create({
* const alert = this.alertCtrl.create({
* title: 'Hello',
* buttons: [{
* text: 'Ok',
* handler: () => {
* // user has clicked the alert button
* // begin the alert's dismiss transition
* let navTransition = alert.dismiss();
* const navTransition = alert.dismiss();
*
* // start some async method
* someAsyncOperation().then(() => {

View File

@ -49,12 +49,10 @@ import { LoadingOptions } from './loading-options';
* ```ts
* import { LoadingController } from 'ionic-angular';
*
* constructor(public loadingCtrl: LoadingController) {
*
* }
* constructor(public loadingCtrl: LoadingController) { }
*
* presentLoadingDefault() {
* let loading = this.loadingCtrl.create({
* const loading = this.loadingCtrl.create({
* content: 'Please wait...'
* });
*
@ -66,7 +64,7 @@ import { LoadingOptions } from './loading-options';
* }
*
* presentLoadingCustom() {
* let loading = this.loadingCtrl.create({
* const loading = this.loadingCtrl.create({
* spinner: 'hide',
* content: `
* <div class="custom-spinner-container">
@ -83,7 +81,7 @@ import { LoadingOptions } from './loading-options';
* }
*
* presentLoadingText() {
* let loading = this.loadingCtrl.create({
* const loading = this.loadingCtrl.create({
* spinner: 'hide',
* content: 'Loading Please Wait...'
* });

View File

@ -38,12 +38,10 @@ import { DeepLinker } from '../../navigation/deep-linker';
* @Component(...)
* class HomePage {
*
* constructor(public modalCtrl: ModalController) {
*
* }
* constructor(public modalCtrl: ModalController) { }
*
* presentProfileModal() {
* let profileModal = this.modalCtrl.create(Profile, { userId: 8675309 });
* const profileModal = this.modalCtrl.create(Profile, { userId: 8675309 });
* profileModal.present();
* }
*

View File

@ -37,12 +37,10 @@ import { ToastOptions } from './toast-options';
*
* @usage
* ```ts
* constructor(private toastCtrl: ToastController) {
*
* }
* constructor(private toastCtrl: ToastController) { }
*
* presentToast() {
* let toast = this.toastCtrl.create({
* const toast = this.toastCtrl.create({
* message: 'User was added successfully',
* duration: 3000,
* position: 'top'

View File

@ -11,9 +11,9 @@
* import { NavParams } from 'ionic-angular';
*
* export class MyClass {
* constructor(public navParams: NavParams) {
* constructor(navParams: NavParams) {
* // userParams is an object we have in our nav-parameters
* this.navParams.get('userParams');
* const params = navParams.get('userParams');
* }
* }
* ```

View File

@ -16,9 +16,7 @@ import { Platform } from './platform';
* @usage
* ```ts
* export class MyClass {
* constructor(public keyboard: Keyboard) {
*
* }
* constructor(public keyboard: Keyboard) { }
* }
* ```
*/

View File

@ -13,7 +13,8 @@ import { ScrollView } from './scroll-view';
* import { Events } from 'ionic-angular';
*
* // first page (publish an event when a user is created)
* constructor(public events: Events) {}
* constructor(public events: Events) { }
*
* createUser(user) {
* console.log('User created!')
* events.publish('user:created', user, Date.now());

View File

@ -10,13 +10,13 @@ import { ErrorHandler } from '@angular/core';
* ### IonicErrorHandler Example
*
* ```typescript
* import { NgModule, ErrorHandler } from '@angular/core';
* import { ErrorHandler, NgModule } from '@angular/core';
* import { IonicErrorHandler } from 'ionic-angular';
*
* @NgModule({
* providers: [{ provide: ErrorHandler, useClass: IonicErrorHandler }]
* })
* class AppModule {}
* class AppModule { }
* ```
*
*
@ -35,7 +35,7 @@ import { ErrorHandler } from '@angular/core';
* @NgModule({
* providers: [{ provide: ErrorHandler, useClass: MyErrorHandler }]
* })
* class AppModule {}
* class AppModule { }
* ```
*
* More information about Angular's [`ErrorHandler`](https://angular.io/docs/ts/latest/api/core/index/ErrorHandler-class.html).