Hello,
I'm trying to set up a project with Angular2 using Microsoft Visual Code
and NodeJs, but I'm stuck with an error of loading of 'es6-promise'.
However I think I've done everything asked on the angular.io (using
system.js, and the provided examples of index.html file and app.ts)
<script>
System.config({
map: {
'es6-shim':'javascripts/es6-shim.js',
'es6-promise': 'javascripts/lib/es6-promise.js',
'angular2/angular2':
'javascripts/lib/angular2.alpha.45.dev.js'
}
});
System.import('es6-promise').then(function(){
debugger;
System.import('es6-shim').then(function(){
System.import('javascripts/app.js');
});
});
</script>
Every file (es6-shim / es6-promise) is really existing, but
angular2.alpha.45.dev.js is still failing at:
var es6Promise = require('es6-promise').Promise;
=> es6Promise // es6Promise is undefined because es6-promise returns an
empty object, so the code fails after that.
I've opened a thread on
http://stackoverflow.com/questions/33714022/simple-run-of-angular2-throws-an-error-with-es6-promise-promise
if
you want more information.
(Why angular.io does not provide simple zip files with full examples (at
least for the javascript versions)?
It would be way simpler to start with a fully functional project.)
Do you have any idea of what's missing?
Thanks for your help.
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.