Solution #3: Undo Delete

This lesson gives a detailed review of the solution to the challenge in the previous lesson.

We'll cover the following...

Solution

import { AppPage } from './app.po';

describe('new App', () => {
  let page: AppPage;

  beforeEach(() => {
    page = new AppPage();
  });
  describe('default screen', () => {
    beforeEach(() => {
      page.navigateTo('/Inbox');
    });
    it('should say Inbox', () => {
      expect(page.getParagraphText()).toContain('Inbox');
    });
  });
});
Solution: Undo Delete

Explanation

Instead of a close button on the toast notification, add a quick “undo” button:

  • To do this, we declare an array deletedStudents to keep ...