天才第一步,配置環(huán)境node,nvm,npm,webpack等。
1.創(chuàng)建一個文件夾angular2-app.內(nèi)置文件有package.json , tsconfig.json , typings.json.
//typings.json { "ambientDependencies": { "es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#7de6c3dd94feaeb21f20054b9f30d5dabc5efabd", "jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#5c182b9af717f73146399c2485f70f1e2ac0ff2b" } }
//package.json { "name": "angular2-app", "version": "1.0.0", "scripts": { "start": "tsc && concurrently "npm run tsc:w" "npm run lite" ", "tsc": "tsc", "tsc:w": "tsc -w", "lite": "lite-server", "typings": "typings", "postinstall": "typings install" }, "license": "ISC", "dependencies": { "angular2": "2.0.0-beta.15", "systemjs": "0.19.26", "es6-shim": "^0.35.0", "reflect-metadata": "0.1.2", "rxjs": "5.0.0-beta.2", "zone.js": "0.6.10" }, "devDependencies": { "concurrently": "^2.0.0", "lite-server": "^2.2.0", "typescript": "^1.8.10", "typings":"^0.7.12" } }
//tsconfig.json { "compilerOptions": { "target": "es5", "module": "system", "moduleResolution": "node", "sourceMap": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "removeComments": false, "noImplicitAny": false }, "exclude": [ "node_modules", "typings/main", "typings/main.d.ts" ] }
2.在當(dāng)前目錄下運(yùn)行(確保node已經(jīng)打開)
npm install
然后就可以看到根目錄下多了一個文件夾node_modules和typings.
3.根目錄下新建文件夾app
這里先寫入兩個文件app.component.ts和main.ts
//app.component.ts import {Component} from "angular2/core"; @Component({ selector: "my-app", template: "My First Angular 2 App
" }) export class AppComponent { constructor(){} }
//main.ts import {bootstrap} from "angular2/platform/browser"; import {AppComponent} from "./app.component"; bootstrap(AppComponent);
4.在根目錄下建立文件index.html和styles.css
//index.htmlAngular 2 QuickStart Loading~~~~
//styles.css /* Master Styles */ h1 { color: #369; font-family: Arial, Helvetica, sans-serif; font-size: 250%; } h2, h3 { color: #444; font-family: Arial, Helvetica, sans-serif; font-weight: lighter; } body { margin: 2em; } body, input[text], button { color: #888; font-family: Cambria, Georgia; } /* * See https://github.com/angular/angular.io/blob/master/public/docs/_examples/styles.css * for the full set of master styles used by the documentation samples */
5.在根目錄下終端運(yùn)行
npm start
這時就會自動跳轉(zhuǎn)到頁面:
此時,我們的第一個angular2頁面就完成啦
文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請注明本文地址:http://systransis.cn/yun/79220.html
本文是PostgreSQL修煉之道這本書的學(xué)習(xí)筆記,記錄下疑惑或不解的地方. 這里也列一些資源: 官方文檔:http://www.postgresql.org/files/documentation/pdf/9.4/postgresql-9.4-A... 中文文檔:http://www.php100.com/manual/PostgreSQL8/ 阮一峰的博客:http://www.ruanyif...
摘要:此原因在一定程度上阻礙了深度學(xué)習(xí)的發(fā)展,并將大多數(shù)機(jī)器學(xué)習(xí)和信號處理研究,從神經(jīng)網(wǎng)絡(luò)轉(zhuǎn)移到相對較容易訓(xùn)練的淺層學(xué)習(xí)結(jié)構(gòu)。深度學(xué)習(xí)算法可以看成核機(jī)器學(xué)習(xí)中一個優(yōu)越的特征表示方法。 摘要:深度學(xué)習(xí)是一類新興的多層神經(jīng)網(wǎng)絡(luò)學(xué)習(xí)算法。因其緩解了傳統(tǒng)訓(xùn)練算法的局部最小性, 引起機(jī)器學(xué)習(xí)領(lǐng)域的廣泛關(guān)注。首先論述了深度學(xué)習(xí)興起淵源, 分析了算法的優(yōu)越性, 并介紹了主流學(xué)習(xí)算法及應(yīng)用現(xiàn)狀,最后總結(jié)當(dāng)前存在的...
閱讀 2582·2021-11-22 13:53
閱讀 4093·2021-09-28 09:47
閱讀 878·2021-09-22 15:33
閱讀 825·2020-12-03 17:17
閱讀 3324·2019-08-30 13:13
閱讀 2130·2019-08-29 16:09
閱讀 1184·2019-08-29 12:24
閱讀 2457·2019-08-28 18:14