xgqfrms / angular2 Goto Github PK
View Code? Open in Web Editor NEW:fire: Angular2 :computer:
Home Page: https://angular2.xgqfrms.xyz
License: MIT License
:fire: Angular2 :computer:
Home Page: https://angular2.xgqfrms.xyz
License: MIT License
let state = {
name: 'xgqfrms',
age: 23,
role: 'admin'
};
// old way to change state
state.role = 'root';
return state;
// new way to change state
return state = {
name: 'xgqfrms',
age: 23,
role: 'root'
};
// no need full hand copy, ES6 Object.assign()
Object.assign(target, ...sources);
Object.assign({}, state, {role: 'root'});
@ decorator
https://tc39.github.io/proposal-decorators/#sec-syntax
https://github.com/wycats/javascript-decorators
https://github.com/tc39/proposal-decorators
https://www.npmjs.com/package/core-decorators#decorate
https://tc39.github.io/proposal-decorators/
ES7
https://googlechrome.github.io/samples/decorators-es7/read-write/
TS
https://www.typescriptlang.org/docs/handbook/decorators.html
JS
https://www.sitepoint.com/javascript-decorators-what-they-are/
https://repl.it/languages/javascript
function doSomething(name) {
console.log('Hello, ' + name);
}
function loggingDecorator(wrapped) {
return function() {
console.log('Starting');
const result = wrapped.apply(this, arguments);
console.log('Finished');
return result;
}
}
const wrapped = loggingDecorator(doSomething);
wrapped(`xgqfrms`);
blogs
https://stackoverflow.com/questions/33635511/simple-es7-decorator-with-babel
https://babeljs.io/docs/en/babel-preset-stage-1/
http://exploringjs.com/es2016-es2017/ch_tc39-process.html
https://medium.com/google-developers/exploring-es7-decorators-76ecb65fb841
https://www.sitepoint.com/javascript-decorators-what-they-are/
zh-Hans
http://es6.ruanyifeng.com/#docs/decorator
http://taobaofed.org/blog/2015/11/16/es7-decorator/
https://juejin.im/post/5b4720c56fb9a04fb016c307
demo
https://lwc.dev/guide/html_templates#data-binding
https://lwc.dev/guide/reference#javascript-decorators
open: { browser: 'Google Chrome'}
gulp.task('connect',function(){
connect.server({
root: [outputDir],
port: 8000,
livereload: true,
// open: { browser: 'Google Chrome'}
});
});
I just confused this ,and can not understand why !
I following the below video tutorial , but some errors occured!
(May be it out of date?)
Get started with gulp Part 6: LiveReload and web server
I'm looking forward to hearing from your reply as soon as possible!
you show me the error code!
gulp.task('connect',function(){???});
gulp.task('connect',function(){
connect.server({
root: [outputDir],
//port: 8080,
livereload: true
//open: { browser: 'Google Chrome'}
//error ?
});
});
H:\Microsoft VS Code\bin
shell
#!/usr/bin/env bash
#
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
NAME="Code"
VSCODE_PATH="$(dirname "$(dirname "$(realpath "$0")")")"
ELECTRON="$VSCODE_PATH/$NAME.exe"
if grep -q Microsoft /proc/version; then
# If running under WSL don't pass cli.js to Electron as environment vars
# cannot be transferred from WSL to Windows
# See: https://github.com/Microsoft/BashOnWindows/issues/1363
# https://github.com/Microsoft/BashOnWindows/issues/1494
"$ELECTRON" "$@"
exit $?
fi
if [ "$(expr substr $(uname -s) 1 9)" == "CYGWIN_NT" ]; then
CLI=$(cygpath -m "$VSCODE_PATH/resources/app/out/cli.js")
else
CLI="$VSCODE_PATH/resources/app/out/cli.js"
fi
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@"
exit $?
@echo off
setlocal
set VSCODE_DEV=
set ELECTRON_RUN_AS_NODE=1
call "%~dp0..\Code.exe" "%~dp0..\resources\app\out\cli.js" %*
endlocal
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.