This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ES5 | |
$scope.$watch(angular.bind(this, function() { | |
return this.someObject; | |
}), function (newValue, oldValue) { | |
// do some stuff | |
}); | |
// ES6 | |
$scope.$watch(() => this.someObject, function(newValue, oldValue) { | |
// do some stuff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$scope.$watch('someObject', function(newValue, oldValue) { | |
// do some stuff | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resolve: { | |
root: path.resolve(__dirname), | |
alias: { | |
services: 'public/app/services', | |
components: 'public/app/components', | |
directives: 'public/app/directives', | |
core: 'public/app/core', | |
css: 'public/css', | |
libs: 'public/libs' | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const colors = require('colors/safe'); | |
const debug = require('debug'); | |
const _ = require('lodash'); | |
const debugLinks = {}; | |
const categories = [ | |
'cache', | |
'core', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function(app) { | |
app.directive('bookTabs', function() { | |
return { | |
restrict: 'E', | |
controllerAs: 'vm', | |
templateUrl: 'book-tabs.tpl.html', | |
controller: 'BookTabsCtrl' | |
}; | |
}); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$stateProvider | |
.state('book', { | |
abstract: true, | |
url: '/:book', | |
template: '<book-tabs />' | |
}) | |
.state('book.about', { | |
url: '', | |
template: '<book-about />' | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const fs = require('fs'); | |
const path = require('path'); | |
const webpack = require('webpack'); | |
const srcDir = 'public'; | |
const dstDir = 'dist'; | |
const entry = 'entry.js'; | |
const output = 'bundle.js'; |