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
// Focused tab | |
const isBrowserTabFocused = () => !document.hidden; | |
isBrowserTabFocused(); | |
// Redirect to... | |
const redirect = (url, replace = false) => { | |
if (asLink) { | |
window.location.href = url; | |
} |
// create a bookmark and use this code as the URL, you can now toggle the css on/off | |
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3 | |
javascript: (function() { | |
var elements = document.body.getElementsByTagName('*'); | |
var items = []; | |
for (var i = 0; i < elements.length; i++) { | |
if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) { | |
items.push(elements[i]); | |
} | |
} |
/** | |
* Copyright (c) Matan Shukry | |
* All rights reserved. | |
*/ | |
import { UrlSegment, UrlSegmentGroup, Route } from '@angular/router'; | |
// export type UrlMatchResult = { | |
// consumed: UrlSegment[]; posParams?: { [name: string]: UrlSegment }; | |
// }; |
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
ini_set('soap.wsdl_cache_enabled', 0); | |
ini_set('soap.wsdl_cache_ttl', 900); | |
ini_set('default_socket_timeout', 15); | |
$params = array('param1'=>$param1); | |
$wsdl = 'http://service_url/method?WSDL'; |
// NOTE: Due to bugs in the Angular/Karma generators, the Karma runner may not work correctly when following the | |
// steps given in yeoman_angular.sh. If that's the case, compare the contents of your test/karma.conf.js with | |
// this version, and edit yours as needed. | |
// Karma configuration | |
// http://karma-runner.github.io/0.12/config/configuration-file.html | |
// Generated on 2014-06-05 using | |
// generator-karma 0.8.1 | |
module.exports = function(config) { |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |