常用知識點,技巧
添加庫到本地:
(舉例
element-ui
)
用npm命令行把包下載到本地
在電腦里找到資源文件,比如
C:\Users\XiaoCong\AppData\Roaming\npm\node_modules\element-ui\lib
然后復制到項目的目錄下
IDEA 15 里的 js 的報錯無視
比如
同時右側顯示這個
臨時筆記
component
組件
成分; 零件; [數]要素; 組分;
Angular2怎么使用第三方的
component
庫(如 jquery,easyUI ,Bootstrap 等)
PWA 增強web app helloWorld跑起來了,之前失敗是因為Chrome服務器插件要翻牆才能下載
https://developers.google.cn/web/fundamentals/getting-started/codelabs/your-first-pwapp/
安裝谷歌插件
web-server-for-chrome
https://chrome.google.com/webstore/detail/web-server-for-chrome/ofhbbkphhbklhfoeikjpcbhemlocgigb/related
黑色主題風格
https://chrome.google.com/webstore/detail/darkness-beautiful-dark-t/imilbobhamcfahccagbncamhpnbkaenm
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
#
web前端響應式框架
Bootstrap
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
#
Weex 安裝 創建項目 都成功,能運行
一直在變化
Weex的文檔的確是值得吐槽的。官方的Demo想跑起來遇坑無數
npm install -g weex-toolkit --registry=https://registry.npm.taobao.org
weex
無法
安裝 Weex Toolkit
npm ERR! fetch failed https://registry.npm.taobao.org/weex-toolkit/download/weex-toolkit-0.4.10.tgz
npm WARN retry will retry, error on last attempt: Error: getaddrinfo EAI_AGAIN cdn.npm.taobao.org:443
安裝 Weex Toolkit
weex
官方
Weex快速上手教程(Weex Tutorial)
https://github.com/weexteam/article/issues/4
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
#
思路
順序:
無法翻牆,幾乎沒有鏡像
TypeScript 無法用npm和鏡像安裝
Angular2(官方推薦用
TypeScript
)
問題
移動 node_modules 文件夾,源文件名太長
npm install -g rimraf 全局安裝
cd xxx[include node_modules folder]
rimraf node_modules(這是文件夾)
使用的是npm里面一個專門用於刪除的模塊插件,看來這貨不僅僅適用於gulp
官方描述:A deep deletion module for node (like rm -rf)
簡單點說,就是模擬unix或者Linux下的rm -rf(強制刪除命令)
可能無效:
- 360的粉碎工具
- 魔方的粉碎工具
- windows 內置命令
新技術,技術前沿
瀏覽器 Fetch ,不用
XMLHttpRequest 對象,
基於 Promise(不是
庫
),
不需要依賴第三方庫
jQuery.ajax,
是使用 XMLHttpRequest 對象來發送異步請求,
jQuery ajax異步請求API 底層是使用
XMLHttpRequest技術
也可以自己造輪子,封裝
XMLHttpRequest 對象相關API
Fetch 是瀏覽器提供的原生 AJAX 接口。使用 window.fetch 函數可以代替
jQuery.ajax
的 $.ajax、$.get 和 $.post。
瀏覽器幫你把 jQuery.ajax 給實現了,以后用 fetch 來發送異步請求,
jQuery很多現代的網站里都不用了
Progressive Web App已經准備好迎接它的黃金時代。微軟正考慮在其瀏覽器中添加Service Worker支持。而且,他們還遵循W3C Maifest創建了manifold.js,使開發人員可以開發跨平台和設備的托管應用。iOS也提供了一種創建“可主屏化(homescreen-able)”應用的方式
Progressive Web Apps /PWA
Google 發的一些視頻講這個, Manifest, Service Worker, Offline, 各種, 讓 Web App 的體驗能更接近原生應用:
之前有個東西叫
Application Cache,但是那貨就是個 shit
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
#
Dart
編輯器無法連到外網升級 D:\Program Files\Dar
t
\
DartEditor.exe
Dart 的變量類型是可選的,叫做 static type annotations
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
#
JavaScript
實時更改瀏覽器里的任何頁面的內容 所用的的 js代碼 /編輯頁面
document.body.contentEditable='true';
(本質上是把
body標簽的contentEditable屬性開啟,置為true
)
360安全瀏覽器 和 Chrome 支持
如圖: 360安全瀏覽器里F12后,在console窗口里執行js代碼:
或者
開發過程中,給 html 源代碼的body標簽的屬性 添加
contentEditable='true'
給客戶的頁面要把這句去掉,即最終成品
建議用 js
用瀏覽器調試
在F12后,控制台里,輸入方法名,不要括號,然后回車,會得到這段代碼的一部分,鼠標單擊后瀏覽器幫忙定位到那個 js文件,更新后
submitForm
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
#
Html5 H5 本地瀏覽器存儲 數據庫
瀏覽器數據庫
IndexedDB API ---2016年8月 最新,web標准組織推薦的
360有web SQL 數據庫,存進去的數據也是key-value這種形式
Web Storage (Second Edition)
W3C Recommendation 19 April 2016
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
#
jQuery EasyUI
jquery ajax 返回的是string類型,整個頁面的html字符串
是基於jQuery的用戶界面插件的集合
text() - 設置或返回所選元素的文本內容,不包括尖括號里的內容
html() - 設置或返回所選元素的內容(包括 HTML 標記<>這種符號)
val() - 設置或返回
表單字段的值
(前端 等我工作后 , 看一下是否穩定 )
現階段還在重復造輪子
ionic creator
Cordova.js 封裝原生系統級API
PhoneGap打包
ionic即基於Angular2的框架 ,
跨平台移動app框架
<script>只能寫在
<body>的最后一個標簽
不能在<body>里的其他標簽的前面
Dojo 基金贊助
這是個基於web的設計界面的工具
http://maqetta.org/
###########
##############
##############
##############
##############
Visual Studio 更新軟件,要重裝嗎
https://www.visualstudio.com/zh-hans/
https://www.visualstudio.com/vs/
代號是15,正式名稱可能是Visual Studio 2016
TypeScript 安裝成功,但eclipse 插件安裝失敗
用TypeScript 做后端開發,有什么框架
用TypeScript 做后端開發,怎么搭配express框架
官方文檔
http://www.typescriptlang.org/docs/tutorial.html
{
要先安裝好TypeScript 和node JavaScript 運行時runtime
在cmd窗口里 進入項目所在的文件夾,叫 a
cd /d E:\TypeScript\a
新建 test
.ts 文件,在里面編輯兩行:(不涉及到html DOM,只是個
cmd
命令行JavaScript 程序,所以不需要用瀏覽器提供的 js 運行時,用node的)
var strName
:string="strName"; //strName 是string類型的
console.log(strName+" 是string類型的");
編譯 .ts文件,
生成 js 文件
---
test
.js
,
用 tsc
命令
tsc test
.ts
運行
.
js
文件,
不是 .ts文件。
用node,不是用ts命令,沒這種命令
node
test
.js
cmd 命令行窗口 輸出
strName 是string類型的
}
tsserver是什么 TypeScript
所有TS的
(
IDE / 編輯器)插件:
npm install -g typescript@2.0
成功
:
cnpm install -g typescript@2.0
C:\Users\XiaoCong>tsc
Version 2.0.3
Syntax: tsc [options] [file ...]
Examples:
編譯
tsc hello.ts
tsc
--outFile file.js file.ts
tsc @args.txt
Options:
--allowJs Allow javascript files to be compiled.
--allowSyntheticDefaultImports Allow default imports from modules with no default export. This does not affect code emit, just typechecking.
--allowUnreachableCode Do not report errors on unreachable code.
--allowUnusedLabels Do not report errors on unused labels.
--baseUrl Base directory to resolve non-absolute module names.
-d, --declaration Generates corresponding '.d.ts' file.
--experimentalDecorators Enables experimental support for ES7 decorators.
--forceConsistentCasingInFileNames Disallow inconsistently-cased references to the same file.
-h, --help Print this message.
--init Initializes a TypeScript project and creates a tsconfig.json file.
--jsx KIND Specify JSX code generation: 'preserve' or 'react'
[typescript@2.0.3] link C:\Users\XiaoCong\AppData\Roaming\npm\tsc@ -> C:\Users\XiaoCong\AppData\Roaming\npm\tsc
[typescript@2.0.3] link C:\Users\XiaoCong\AppData\Roaming\npm\tsserver@ -> C:\Users\XiaoCong\AppData\Roaming\npm\tsserver
[typescript@2.0] installed at node_modules\.typescript_npminstall\typescript\2.0.3\typescript (1 packages, use 3s, speed 823.92kB/s, json 7.19kB, tarball 2.65MB)
All packages installed (1 packages installed from npm registry, use 3s, speed 819.95kB/s, json 1(7.19kB), tarball 2.65MB)
TypeScript
Koa 無法下載
NodeJS
這個正常
SqlPad 可視化查詢各種數據庫,用圖表顯示出來 {
sqlpad@1.17.2
https://github.com/rickbergfalk/sqlpad
sqlpad --dir c:/sqlpad/ --port 3000 --passphrase secret-encryption-phrase
sqlpad --dir 存的目錄 --port 3000 --passphrase 連接數據庫的密碼
晚點才指定要連接哪個數據庫
sqlpad --dir
E:
/
SqlPad
/
--port 3000 --passphrase secret-encryption-phrase
剛開始要要郵箱注冊一下
835570372@qq.com
1
管理員:
root
1111
ping 192.168.57.30
MySQL配置,在瀏覽器里
192.168.57.30
默認端口號為:3306
jdbc:mysql://localhost:3306/數據庫名
? user=root&password=1111&useUnicode=true&characterEncoding=utf-8
registration 登記,注冊
}
npm 臨時使用遠程倉庫
npm install XXX -g --registry=
https://registry.npm.taobao.org
--registry=https://registry.npm.taobao.org
設定倉庫
設置成 淘寶npm鏡像倉庫:
npm config set registry https://registry.npm.taobao.org --global
然后
npm config list
確認網址被配置
npm config set disturl https://npm.taobao.org/dist --global
npm install -g <module-name>
npm install -g react-native
cnpm install -g react-native
全局安裝模塊的話 npm install -g <n>
C:\Users\XiaoCong\AppData\Roaming\npm
C:\Users\XiaoCong\AppData\Roaming\npm\node_modules
npm install [name]
npm工具默認是從國外的倉庫里下載express (可以臨時改,
--registry=https://registry.npm.taobao.org
也可以改npm的
的配置文件,我放在
C:\Users\XiaoCong\.npmrc
安裝路徑下,或者用npm config配置:
npm config list
npm config set registry https://registry.npm.taobao.org
npm info underscore
然后會很快冒出一大長串的東西,沒有紅色報錯
里面會有
;
userconfig C:\Users\XiaoCong\.npmrc
registry = "https://registry.npm.taobao.org/"
手動指定倉庫的位置
npm install -g
cnpm --registry=
https://registry.npm.taobao.org
node -v
v4.5.0
npm -v
2.15.9
npm -v
卸載:npm uninstall -g express
安裝 指定好的版本: npm install -g express@3.5.0
cnpm
cnpm install -g typescript
cnpm install
express-generator -g
express
express-generator1
------用
express-generator
創建express-generator1
項目,在當前路徑
E:\React\express-generator1
cnpm install ---安裝依賴
set DEBUG=
express-generator1
& npm start
失敗 create-react-app my-app
Creating a new React app in E:\create-react-app\my-app.
Installing packages. This might take a couple minutes.
Installing react-scripts from npm...
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "D:\\Program Files (x86)\\nodejs\\node.exe" "D:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save-dev" "--save-exact" "react-scripts"
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
npm ERR! shasum check failed for C:\Users\XiaoCong\AppData\Local\Temp\npm-28664-680e4ff5\registry.npmjs.org\react-scripts\-\react-scripts-0.1.0.tgz
npm ERR! Expected: 400e97d5aac972485b190073b409278266f54869
npm ERR! Actual: b8466a71ebdd4b0a13468a524424238bd753cee1
npm ERR! From: https://registry.npmjs.org/react-scripts/-/react-scripts-0.1.0.tgz
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! E:\create-react-app\my-app\npm-debug.log
`npm install --save-dev --save-exact react-scripts` failed
360瀏覽器里,下載第一個,
n ,管理npm的工具,比如升級后者
npm install -g n 失敗
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "D:\\Program Files (x86)\\nodejs\\node.exe" "D:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "n"
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported
npm ERR! notsup Not compatible with your operating system or architecture: n@2.1.3
npm ERR! notsup Valid OS: !win32
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: x64
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\XiaoCong\npm-debug.log
失敗
cnpm install -g n
[n@2.1.3](.\AppData\Roaming\npm\node_modules\n) unsupported: Package require os(!win32) not compatible with your platform(win32)
UnSupportedPlatformError: Package require os(!win32) not compatible with your platform(win32)
UnSupportedPlatformError: Package require os(!win32) not compatible with your platform(win32)
at _install (C:\Users\XiaoCong\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\lib\install.js:146:19)
at next (native)
at onFulfilled (C:\Users\XiaoCong\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\node_modules\co\index.js:65:19)
失敗? cnpm install -g react-native
Get /binary-mirror-config/latest from https://registry.npm.taobao.org error: ResponseTimeoutError: Request timeout for 5000ms, GET https://registry.npmjs.org/binary-mirror-config/latest -1 (connected: true, keepalive socket: false)
headers: {}
at null._onTimeout (C:\Users\XiaoCong\AppData\Roaming\npm\node_modules\cnpm\node_modules\urllib\lib\urllib.js:653:13)
at Timer.listOnTimeout (timers.js:92:15)
[cross-spawn-async@2.2.4](.\AppData\Roaming\npm\node_modules\.react-native_npminstall\cross-spawn\2.2.3\cross-spawn\node_modules\cross-spawn-async) deprecate: cross-spawn no longer requires a build toolchain, use it instead!
[minimatch@2.0.10](.\AppData\Roaming\npm\node_modules\.react-native_npminstall\glob\4.3.5\glob\node_modules\minimatch) deprecate: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
[react-native@0.30.0] link C:\Users\XiaoCong\AppData\Roaming\npm\react-native@ -> C:\Users\XiaoCong\AppData\Roaming\npm\react-native
[react-native@*] installed at node_modules\.react-native_npminstall\react-native\0.30.0\react-native (662 packages, use 2m, speed 186.5kB/s, json 4.45MB, tarball 18.08MB)
excute post install scripts...
[spawn-sync@1.0.15] scripts.postinstall: "node postinstall" at .\AppData\Roaming\npm\node_modules\.react-native_npminstall\spawn-sync\1.0.15\spawn-sync
[spawn-sync@1.0.15] scripts.postinstall success, use 387ms
peerDependencies WARNING [react-native@0.30.0] in C:\Users\XiaoCong\AppData\Roaming\npm\node_modules\.react-native_npminstall\react-native\0.30.0\react-native requires a peer of react@~15.2.0 but none was installed
All packages installed (662 packages installed from npm registry, use 2m, speed 184.73kB/s, json 909(4.45MB), tarball 18.08MB)
MEAN
View Angular2
M MongoDB
C express
N nodejs 服務器端的js運行時 runtime
可選---s sail.js
MongoDB 3.2
MEAN Web開發
TP393.092.2/H625
MEAN Web Development
)
http://www.npmjs.org/ , 沒有被牆,但太慢了,要等一個晚上,而且很可能因為不穩定而中途斷開
淘寶自己做的小工具:
cnpm用的是
淘寶自己的“ 鏡像
”
倉庫
(通過npm安裝,倉庫手動指定為淘寶的“
鏡像倉庫
”
)。淘寶鏡像倉庫每10分鍾和npm同步,更新一下
以后都用cnpm替代npm
也可以用npm,只是以后都手動指定倉庫的位置
npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm install -g create-react-app
成功
C:\Users\XiaoCong>cnpm install -g create-react-app
[create-react-app@0.1.0] link C:\Users\XiaoCong\AppData\Roaming\npm\create-react-app@ -> C:\Users\XiaoCong\AppData\Roaming\npm\create-react-app
[create-react-app@*] installed at node_modules\.create-react-app_npminstall\create-react-app\0.1.0\create-react-app (16 packages, use 2s, speed 63.89kB/s, json 68.7kB, tarball 69.1kB)
All packages installed (16 packages installed from npm registry, use 2s, speed 62.95kB/s, json 17(68.7kB), tarball 69.1kB)
替代npm,用淘寶的
Express 單獨
React 單獨
用 Vue 寫了一個知乎日報 web app http://www.tuicool.com/articles/maYnY3j
音樂播放器 AngularJS和Node.js
http://open.itcast.cn/front/3-432.html
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
#
IDE
所見即所得
Google Web Designer
GoogleWebDesigner
DreamWeaver 登錄不了,而且要破解
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
#
Electron 連不上
范例 npm install XXX -g --registry=
https://registry.npm.taobao.org
npm install
--registry=
https://npm.taobao.org/mirrors/electron/
npm ERR! fetch failed https://registry.npm.taobao.org/electron/download/electron-1.3.5.tgz
npm WARN retry will retry, error on last attempt: Error: getaddrinfo EAI_AGAIN cdn.npm.taobao.org:443
https://registry.npm.taobao.org/electron/download/electron-1.3.5.tgz
成熟的產品
在cmd的當前目錄下創建
Electron
1文件夾,
--depth 1說明只拷貝最新版本,不用把舊版本也拷貝進來,版本控制
cd Electron1
npm install && npm start
弄了環境變量
以前叫 Atom-shell(為了開發Atom而開發出來的平台) ,后來被GitHub官方單獨出來
被太太了,Node-webkit,國產的
Github發布了為桌面應用開發而生的 Electron 1.0版本 http://www.tuicool.com/articles/7jAbuey
#####################################################
Deco -React Native IDE 暫時只支持 Mac
開源
https://www.decosoftware.com/
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
#
WeX5 :
| V |
C |
M |
| .w |
.js Tomcat?Node.js? |
MySQL |
MySQL
有管理工具 , 但只用來創建數據庫 , 表的設計和數據填寫用IDE
標准Web服務器,可以是tomact、apache、nginx、IIS等任意web服務器
WeX5的調試運行環境(UIServer)
WeX5執行流程
.w 文件是什么時候被解析的?
論壇里說如果不需要服務器的話,可以不用。但這樣誰來
解析
.w 文件?顯然瀏覽器無法識別
.w 文件,
可能
論壇里說的是錯的
自帶一個Chrome瀏覽器 , 封裝過的
導入eclipse的設置
不出很想學了 , 因為用的似乎不是最新的技術
雖然可視化開發起來很快
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
#
React_Native 挑出來了,2個文件
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
#
SeaJS
一個遵循CMD規范的JavaScript模塊加載框架
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
#
需要改進的地方 :
捕魚app的教程不在百度雲里
項目的文檔結構怪怪的 , 感覺應該需要重新設計一下
視頻的名字換一下
打包一下 , 整理到一個文件夾下 , 不然一個一個整合在一起麻煩 , 耗時間
文檔開源到GitHub上 , 官方文檔更新不及時就讓大家輔助更新
Crosswalk is an app runtime based on Chromium/Blink.
Crosswalk是之前的webView的替代 , 更流暢 , 可以弄游戲了
mongodb
body-parser
正經事兒就找 圖靈機器人,想扯淡瞎聊就找小黃雞。
別急着寫代碼
放棄WebView,使用 Crosswalk 做富文本編輯器
原生的
國內的
星期一的交流一下
ASP.Net WebForm
選擇IDE
是不是真的是ionic
ionic Phonegap Cordova Angular關系
設備api:采用業界主流Phonegap/Cordova
后端:標准協議,支持所有主流技術和平台
(java、node、php、.net等)
要項目
NDK
圖形
自己的路由器的產品
需要設置頁面,用戶不限制
web app
沒有足夠的人手搞混合,只能自己搞
Registry url: https://registry.npmjs.org/
Path to npm: D:\Software\Node.js\npm.cmd
Downloading package cache to C:\Users\Administrator\AppData\Local\Microsoft\Node.js\Tools\NpmCache\21dd91b0-4f32-449a-ab4e-bff350c38106\all_packages.json

WeX5跨平台原理 : 本機API Framework采用phonegap(cordova)框架
WeX5采用混合應用(hybrid app)開發模式, UI體系完全基於w3c的html5+css3+js;引入jquery和bootstrap並對移動做了極致優化,效率極高
有基於eclipse的自定義IDE
dreamsxin/WeX5
"
起步軟件公"司
http://git.oschina.net/X5OK/WeX5
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
#
PowerCmd_2.2_增強綠色版
PowerShel
l win7自帶的cmd增強工具 , 但
不夠好用 ,
沒有關鍵字聯想
注冊碼 :
PCMDA-NNZNV-ZNVNN-CADPM
PCMDA-8CYLA-Y8ACL-CADPM
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
#
原理
JS模板技術,template。用正則,有一些關鍵字,用來標哪些需要被替換
前端框架 自定義的語法 用的是JavaScript模板引擎嗎
JavaScript模板引擎的原理(思想)是 字符串替換吧
其中一種實現方法是 正則表達式
TemplateJS
前端框架 自定義的語法 用的是JavaScript模板引擎嗎
SeaJS和RequireJS各有各的使用場景,有空的話兩個都教
那些前端框架有很多自己的語法,比如Angular2 用ng
這些應該也是用“替換”吧
這一小段是Angular2 的
用到template這個字眼
而且標簽里面的(click)不是標准,也就是這個是Angular2 獨有的
既然這樣,Angular2 應該會用正則替換的方式把(click)這些替換成標准寫法,當然,應該用到了JavaScript模板引擎,自己弄正則表達式容易錯
前端框架 自定義的語法 用的是JavaScript模板引擎嗎
JavaScript模板引擎的原理(思想)是 字符串替換吧
其中一種實現方法是 正則表達式
TemplateJS
前端框架 自定義的語法 用的是JavaScript模板引擎嗎
SeaJS和RequireJS各有各的使用場景,有空的話兩個都教
那些前端框架有很多自己的語法,比如Angular2 用ng
這些應該也是用“替換”吧
這一小段是Angular2 的
用到template這個字眼
而且標簽里面的(click)不是標准,也就是這個是Angular2 獨有的
既然這樣,Angular2 應該會用正則替換的方式把(click)這些替換成標准寫法,當然,應該用到了JavaScript模板引擎,自己弄正則表達式容易錯
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
#
