私は角型シードをクローンしてAngularjsアプリケーションを作成しました。ビジュアルスタジオの中で角度シードプロジェクトを実行しますか?
git clone --depth=1 https://github.com/angular/angular-seed.git Web
cd Web
npm install
するとアプリがnpm start
を実行することで起動することができます。
私は新しいプロジェクトを作成し、 "Javascript - > Node.js - > Existing Node.jsコードから"テンプレートを選択しようとしました。次に、開始jsファイルをWeb/app.app.js
に設定しました。しかし、アプリケーションを実行(デバッグ)は、次のエラーがありますか?
Debugger listening on [::]:5858 D:\....Web\app\app.js:4 angular.module('myApp', [ ^ ReferenceError: angular is not defined at Object. (D:\....\Web\app\app.js:4:1) at Module._compile (module.js:556:32) at Object.Module._extensions..js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Timeout.Module.runMain [as _onTimeout] (module.js:590:10) at tryOnTimeout (timers.js:232:11) at Timer.listOnTimeout (timers.js:202:5) Press any key to continue...
更新: 私はnodejsの角度アプリを展開する必要があります。どのようにノード上で実行する角度のあるプロジェクトを作成するのですか?
app.jsを開始スクリプトとして設定しないでください。代わりにVSがindex.htmlページを開くようにするには? – ca9163d9