在命令行輸入:npm -v
若是出現以下畫面即安裝成功 css
sudo npm install -g @angular/cli
輸入ng -v
,如出現如下畫面即表示安裝成功html
命令:ng new XXX
,XXX表示項目名稱,如:ng new iAngular
此時在相應目錄下就會有新項目生成
node
platformBrowserDynamic().bootstrapModule(AppModule)
來加載模塊AppModule
declarations: [AppComponent]
聲明並經過bootstrap: [AppComponent]
加載AppComponent
組件@Component
指定了選擇器名稱、模板URL和組件樣式文件{{title}}
表達式讀取控制器中的元素title
樣式文件(*.css)npm
首頁index.html
bootstrap
npm start
命令,出現如下畫面即表示啓動成功: