- Use one-time-bind on expressions ( {{::value}} )
- Replace
$scope.$apply()
with$scope.$digest()
whenever possible - Move filters to controllers
To get the total watchers on the current page, you can run this script on the browser console:
$scope.$apply()
with $scope.$digest()
whenever possibleTo get the total watchers on the current page, you can run this script on the browser console:
<style> | |
/* Add "Completed" to like buttons */ | |
.view-space-in-group--88671 .action-link, | |
.view-space-in-group--88671 .action-like.action-item { | |
background-color: var(--brand); | |
padding: 4px 8px; | |
border-radius: 11px; | |
opacity: 1; | |
} |
#!/bin/bash | |
CHANGED_FILES=`git diff origin/master...HEAD --name-only` | |
node_modules/eslint/bin/eslint.js -f json $CHANGED_FILES --quiet | node_modules/eslines/index.js --quiet | |
if [[ $? != 0 ]] ; then | |
echo "Fix style violations" | |
exit 1 | |
fi | |
echo "All changed files are good" |
This docker image is a Selenium Webdriver server where our specs will be directed against. It contains the Firefox and Chrome to run our specs headless. It also provides us VNC access to check what is going on the browser.
$ docker run --rm --net="host" -e VNC_PASSWORD=pancakes elgalu/selenium:v2.45.0-ssh3
var contentEditorMachine = Machine({ | |
id: 'content', | |
strict: true, | |
initial: 'unknown', | |
context: { | |
variants: [ | |
{ id: '1', status: 'draft' }, | |
{ id: '2', status: 'live' }, | |
], | |
currentVariant: { |
var contentEditorMachine = Machine({ | |
id: 'content', | |
strict: true, | |
initial: 'unknown', | |
on: { | |
CLEAR_ERROR: { | |
actions: 'clearError' | |
} | |
}, | |
context: { |
var variantEditorMachine = Machine({ | |
id: 'editing', | |
initial: 'editing', | |
states: { | |
editing: { | |
id: 'live', | |
on: { | |
SAVE_CHANGES: 'saving', | |
DISCARD_CHANGES: 'confirmingDiscard' |
const editingMachine = Machine({ | |
id: 'editing', | |
initial: 'editing', | |
states: { | |
editing: { | |
id: 'live', | |
on: { | |
SAVE_CHANGES: 'saving', | |
DISCARD_CHANGES: 'confirmingDiscard' | |
} |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |