Skip to content

Instantly share code, notes, and snippets.

View schmkr's full-sized avatar

Alwin Schoemaker schmkr

View GitHub Profile
@schmkr
schmkr / example.js
Last active June 23, 2020 13:03
angular ui router 404 without redirect
angular.module("app.example", ["ui.router"])
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider.state("404", {
templateUrl: "errors/notfound.tpl.html",
data: {
authorizationRequired: false,
permissionsRequired: [],
bodyClass: "error"
}
@schmkr
schmkr / README.md
Created August 3, 2018 12:03
CodeceptJS helper to check for emails in Mailcatcher

CodeceptJS helper for Mailcatcher

This is a helper for CodeceptJS to check for emails sent to MailCatcher during a test.

usage

  • Download mailcatcher.js to your project that has CodeceptJS and make sure to add got as npm dependency (or replace the usages of got in this helper by your preferred http library).
  • Make sure the application you're testing is sending the emails to a mailcatcher instance.

In your codecept.config.js add something like this to your helpers configuration:

#tab1:checked ~ div .na-keuze #eindcijfer1,
#tab2:checked ~ div .na-keuze #eindcijfer1,
#tab2:checked ~ div .na-keuze #eindcijfer2,
#tab3:checked ~ div .na-keuze #eindcijfer1,
#tab3:checked ~ div .na-keuze #eindcijfer2,
#tab3:checked ~ div .na-keuze #eindcijfer3,
#tab4:checked ~ div .na-keuze #eindcijfer1,
#tab4:checked ~ div .na-keuze #eindcijfer2,
#tab4:checked ~ div .na-keuze #eindcijfer3,
#tab4:checked ~ div .na-keuze #eindcijfer4,
@schmkr
schmkr / README.md
Last active July 24, 2020 10:26
Zoneless Angular App

Example of running an Angular app without NgZone

Angular app that is running without NgZone. Triggering change-detection happens like this:

merge(
	fromEvent(document, 'click'),
	fromEvent(document, 'mousemove'),
	fromEvent(document, 'keydown'),
	fromEvent(document, 'scroll'),