I hereby claim:
- I am yesmeck on github.
- I am yesmeck (https://keybase.io/yesmeck) on keybase.
- I have a public key whose fingerprint is 26A9 0B54 5590 9D71 AC36 90B6 E3B5 FC04 0B5C 10B3
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| app.directive('ngEnter', function() { | |
| return function(scope, element, attrs) { | |
| element.bind("keydown keypress", function(event) { | |
| if(event.which === 13) { | |
| scope.$apply(function(){ | |
| scope.$eval(attrs.ngEnter); | |
| }); | |
| event.preventDefault(); | |
| } |
假设有个 API /articles 返回的结构如下:
articles: article*
article: {
author: user,
likers: user*
primary_collection: collection?
collections: collection*
}| sudo apt-get update | |
| sudo apt-get install python-virtualenv libxslt1-dev libxml2 | |
| sudo apt-get install python-dev | |
| sudo apt-get install postgresql | |
| sudo apt-get install postgresql-server-dev-9.3 | |
| sudo apt-get install redis-server | |
| sudo -u postgres createuser -s sentry | |
| sudo -u postgres psql -c "alter user sentry with password 'sentry';" |
| /** | |
| * Due to RequireBin's bug https://github.com/maxogden/requirebin/issues/110, | |
| * please add `<div id="root"></div>` to the `<body>`. | |
| * Then hit Run Code when it's green. | |
| */ | |
| require('babel-polyfill') | |
| const React = require('react') | |
| const ReactDOM = require('react-dom') | |
| const tuku = require('tuku').default |
| // Welcome! require() some modules from npm (like you were using browserify) | |
| // and then hit Run Code to run your code on the right side. | |
| // Modules get downloaded from browserify-cdn and bundled in your browser. | |
| const React = require('react') | |
| const tuku = require('tuku') | |
| const router = require('tuku/router') |
made with esnextbin