Skip to content

Input example does not show alert #105

@ptmkenny

Description

@ptmkenny

How to reproduce

  1. Go to https://ionic-svelte.firebaseapp.com/components/Inputs.
  2. Fill out a first and last name and submit the form.
  3. No alert is shown.

Problem

The code for Input/+page.svelte is supposed to show an alert, but this is in a submit() function that never gets called:

	function submit() {
		if (!$errors) {
			const controller = alertController
				.create({
					header: 'Account Created',
					message: `Created account for: <b>${$form.firstName} ${$form.firstName}</b>`,
					buttons: [
						{
							text: 'OK'
						}
					]
				})
				.then((alert) => alert.present());
		}

		if ($errors) {
			const controller = alertController
				.create({
					header: 'Account Not Created',
					message: `There were some errors - see console.log`,
					buttons: [
						{
							text: 'OK'
						}
					]
				})
				.then((alert) => alert.present());
		}
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions