By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
Cypress.Commands.add('loginOkta', () => { | |
const optionsSessionToken = { | |
method: 'POST', | |
url: Cypress.env('session_token_url'), | |
body: { | |
username: Cypress.env('username'), | |
password: Cypress.env('password'), | |
options: { | |
warnBeforePasswordExpired: 'true' | |
} |
import { NgbDatepickerConfig, NgbDateParserFormatter } from '@ng-bootstrap/ng-bootstrap'; | |
import { NgbDateFRParserFormatter } from "./ngb-date-fr-parser-formatter" | |
@Component({ | |
providers: [{provide: NgbDateParserFormatter, useClass: NgbDateFRParserFormatter}] | |
}) | |
export class AppComponent {} |
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
let clickStream = Rx.Observable.fromEvent(document.getElementById('link'), 'click'); | |
clickStream | |
.buffer(clickStream.debounce(250)) | |
.map(list => list.length) | |
.filter(x => x === 2) | |
.subscribe(() => { | |
console.log('doubleclick'); | |
}) |
title | slug | createdAt | language | preview |
---|---|---|---|---|
Unit testing Angular.js app with node.js, mocha, angular-mocks and jsdom |
unit-testing-angular-js-app-with-node |
2015-07-05T18:04:33Z |
en |
Majority of search result about unit testing Angular.js apps is about how to do it by using test frameworks that run the tests in a real browser. Even though it's great to be able to test your code in multiple platforms, in my opinion it creates a lot of boilerplate code and makes it hard to run the tests in, for instance a CI-server. |
Lean unit tests with minimal setup
(() => { | |
'use strict'; | |
/************************************************************* | |
* @ngdoc controller | |
* @name dashboard.customer.controller:CustomerCtrl | |
* | |
* @description | |
* | |
* CustomerCtrl Class for Customer Model |
// Alerts | |
@include alert-variant($background, $border, $text-color); | |
// Background Variant | |
@include bg-variant($parent, $color); | |
// Border Radius | |
@include border-top-radius($radius); | |
@include border-right-radius($radius); | |
@include border-bottom-radius($radius); |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
input[type=checkbox] { | |
outline: none; | |
width: 58px; | |
height: 23px; | |
font-size: 11px; | |
line-height: 2; | |
display: block; | |
font-weight: bold; | |
border-radius: 3px; | |
border: 1px solid #B9B9B9; |
<!DOCTYPE html> | |
<head> | |
<script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script> | |
<script src="rx.min.js" type="text/javascript"></script> | |
<script src="rx.jquery.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
$(function () { | |
var dragTarget = $('#dragTarget') |