Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am omgduke on github.
  • I am omgduke (https://keybase.io/omgduke) on keybase.
  • I have a public key ASA0FEfyprnPCrIC_-etebZhnGUB25SfdAkcPfr0MZ4KQgo

To claim this, I am signing this object:

@OMGDuke
OMGDuke / tokenlessUrl.js
Created April 18, 2017 15:27
Passing a token as param with state to a tokenless url
function config($stateProvider) {
$stateProvider.state('my-component.hello-world', {
url: '/myUrl',
params: {tokenName: null},
template: '<hello-world></hello-world>',
resolve: {promise: myCallback}
});
}
// set a url that doesnt include the params and provide a default value of null for your params.
@OMGDuke
OMGDuke / elementsAsArray.js
Last active May 8, 2017 13:34
Debugging protractor tests
// List all found elements as array
element.all(by.css('div p')).getText().then(console.log);