I'm wondering what I need to do to use the latest version of system.js 
<https://github.com/systemjs/systemjs> with an Angular 2 application (I'm 
currently using alpha 35).

In the Angular 2 Quickstart 
<https://angular.io/docs/js/latest/quickstart.html> page, they use this 
line:

<script src="https://jspm.io/[email protected]";></script>
 
If I change that to use the latest system.js (and also include the latest 
traceur.js and rx.js), I get these errors:

Failed to load resource: the server responded with a status of 404 (Not 
Found)
http://localhost:50924/pages/study Failed to load resource: the server 
responded with a status of 404 (Not Found)
http://localhost:50924/pages/report Failed to load resource: the server 
responded with a status of 404 (Not Found)
http://localhost:50924/pages/home Failed to load resource: the server 
responded with a status of 404 (Not Found)
http://localhost:50924/pages/prefs Failed to load resource: the server 
responded with a status of 404 (Not Found)

>From my app.ts:


import { Component, View, bootstrap, bind } from 'angular2/angular2';
import { RouteConfig, RouterLink, RouterOutlet, routerInjectables, 
LocationStrategy, HashLocationStrategy } from 'angular2/router';


    // Pages
import { Home } from "./pages/home"
import { UserPreferences } from "./pages/prefs"
import { Study } from "./pages/study"       // We don't have to specify the 
.js extension
import { Report } from "./pages/report"


    // Directives
import { Multiselect } from "./directives/multiselect"
import { Polarmap } from "./directives/polarmap"


 // Dialogs
//import { EditAllControlsDlg } from "./dialogs/editAllControlsDlg"
//import { EditControlDlg } from "./dialogs/editControlDlg"


@Component({ selector: 'csreport' })        // This component is injected 
into <csreport></csreport> tags in HTML
@View({
    templateUrl: 'navbar.html',
    directives: [RouterLink, RouterOutlet]
})   // View: defines HTML that represents the component


   
@RouteConfig([
    { path: '/', redirectTo: '/home' },
    { path: '/study/:id', as: 'study', component: Study },
 { path: '/report', as: 'report', component: Report },
    { path: '/home', as: 'home', component: Home },
    { path: '/prefs', as: 'prefs', component: UserPreferences }
])


It *appears* that the issue is related to the @RouteConfig, since the 
console errors listed above are the same as everything I have in my 
@RouteConfig setup at the bottom there.

Any idea why changing from [email protected] to the latest system.js would 
trigger this error?
            
            <!-- Upgraded system.js to 0.19.4 on 10/14/2015. 
https://github.com/systemjs/systemjs -->
           <!--    <script 
src="3rdParty/Utils/[email protected]"></script>-->
           <script src="3rdParty/Utils/rx.js"></script> 
            <script src="3rdParty/Utils/traceur.js"></script> 
            <script src="3rdParty/Utils/system.js"></script>

My hunch is this may be due to using router.js from Angular Alpha 35... and 
maybe that's incompatible with the latest system.js?

If that's the case, could someone point me in the right direction to get a 
minified "everything that's required" latest-source Angular 2 setup 
up-and-running, where all files are local to my machine? (no external 
references that require a network connection... that's a requirement for 
the project I'm working on)

-Vern

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