So my project is 98% of the way ported to use the latest Angular 2 (alpha 
44), system.js (0.19.5), etc. Just one remaining hitch. My lines:
import { Study } from "./pages/study"
import { Report } from "./pages/report"

seem to be causing these console errors at runtime:

*GET http://localhost:51175/pages/report 404 (Not Found)*

Full error:
fetchTextFromURL @ system.src.js:1049(anonymous function) @ system.src.js:
1567lib$es6$promise$$internal$$initializePromise @ 
angular2.dev.js:1554lib$es6$promise$promise$$Promise 
@ angular2.dev.js:1845(anonymous function) @ system.src.js:1566(anonymous 
function) @ system.src.js:2458(anonymous function) @ 
system.src.js:3023(anonymous 
function) @ system.src.js:3254(anonymous function) @ 
system.src.js:3816(anonymous 
function) @ system.src.js:4007(anonymous function) @ 
system.src.js:4253(anonymous 
function) @ system.src.js:326run @ angular2.dev.js:138zoneBoundFn @ angular2
.dev.js:111lib$es6$promise$$internal$$tryCatch @ 
angular2.dev.js:1507lib$es6$promise$$internal$$invokeCallback 
@ angular2.dev.js:1519lib$es6$promise$$internal$$publish @ angular2.dev.js:
1490(anonymous function) @ angular2.dev.js:219run @ angular2.dev.js:
138zoneBoundFn @ angular2.dev.js:111lib$es6$promise$asap$$flush @ angular2.
dev.js:1301
system.src.js:1049 GET http://localhost:51175/pages/study 404 (Not Found)

My folder structure is
index.html
app.ts
[pages]
    study.ts    // compiled into .js
    report.ts    // compiled into .js

I am configuring System like so in index.html:

                System.config({
                 //   baseURL: './pages'
                    packages: { 'app': { defaultExtension: 'js' } }
                });
                System.import('app.js');


I have found only minimal documentation for import, which leaves many 
questions unanswered:

https://github.com/systemjs/systemjs/blob/master/docs/es6-modules-overview.md

If I specify "./pages/study.js" (i.e. includes the .js extension) then it 
finds the file, but complains that this is not a module.

I feel like I'm perhaps missing something for System.config(), or am doing 
the import statement wrong. Any ideas?

-- 
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.

Reply via email to