i updated project angular 2 rc 6. trying use ahead of time (aot) compilation mentioned in blog post http://angularjs.blogspot.com/ no success.
i not using angular cli building project in asp.net.
as blog post suggests, have installed @angular/compiler-cli
but when try run ngc command prompt gives error
'ngc' not recognized internal or external command, operable program or batch file. npm run ngc npm err! windows_nt 10.0.10586 npm err! argv "c:\\program files\\nodejs\\node.exe" "c:\\program files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "ngc" npm err! node v6.4.0 npm err! npm v3.10.3 npm err! missing script: ngc npm err! npm err! if need help, may report error at: npm err! <https://github.com/npm/npm/issues> npm err! please include following file support request: npm err! d:\project\app\npm-debug.log
can please guide how use aot compiler asp.net project. or when not using angular cli building components etc manually.
edit
i managed run ngc first moving ./node_modules/.bin/ , running
ngc -p d:\project\app
but compiler throwing below error:
when try compile project ngc, throws below error:
error: error encountered resolving symbol values statically. function calls not supported. consider replacing function or lambda reference exported function (position 92:25 in original .ts file), resolving symbol appmodule in
in app module have below providers , causing project. not sure wrong this?
providers: [ globalservice, { provide: http, usefactory: (backend: xhrbackend, defaultoptions: requestoptions, globalservice: globalservice) => new httploading(backend, defaultoptions, globalservice), deps: [xhrbackend, requestoptions, globalservice] } ],
globalservice, { provider: http, // <-- believe missing "r" in provide"r" }
take @ rc6 breaking changes:
https://github.com/angular/angular/blob/master/changelog.md#breaking-changes
Comments
Post a Comment