This repository has been archived by the owner on Jun 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to angular 2 beta 0 (closes #35)
- Loading branch information
1 parent
4f881ed
commit 1ec8cf5
Showing
13 changed files
with
156 additions
and
356 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<router-outlet></router-outlet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
"use strict"; | ||
|
||
// import Angular 2 | ||
import {Component} from "angular2/core"; | ||
|
||
// import Angular 2 Component Router | ||
// reference: http://blog.thoughtram.io/angular/2015/06/16/routing-in-angular-2.html | ||
import {RouteConfig, Route, RouterOutlet, RouterLink, Router} from "angular2/router"; | ||
|
||
// app components | ||
import {Home} from "../pages/home/home"; | ||
|
||
// app services | ||
//import {appServicesInjectables} from "core/services/services"; | ||
|
||
@Component({ | ||
selector: "app", | ||
templateUrl: "core/app.template.html", //template: "<router-outlet></router-outlet>", | ||
directives: [RouterOutlet, RouterLink] | ||
}) | ||
@RouteConfig([ | ||
{ path: "/", component: Home, as: "Home", data: undefined } // the as serves as alias for links, etc | ||
]) | ||
export class App { | ||
constructor() { | ||
console.log("Application bootstrapped!"); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
"use strict"; | ||
|
||
// import the application | ||
import {App} from "./app"; | ||
|
||
// import Angular 2 | ||
import {bootstrap} from "angular2/bootstrap"; | ||
import {provide, enableProdMode} from "angular2/core"; | ||
import {HTTP_PROVIDERS} from "angular2/http"; | ||
|
||
// import Angular 2 Component Router | ||
// reference: http://blog.thoughtram.io/angular/2015/06/16/routing-in-angular-2.html | ||
import {LocationStrategy, PathLocationStrategy, ROUTER_PROVIDERS} from "angular2/router"; | ||
|
||
// enable production mode of Angular | ||
//enableProdMode(); | ||
|
||
// bootstrap our app | ||
console.log("Bootstrapping the App"); | ||
|
||
// in [] is the list of injector bindings. Those bindings are used when an injector is created. Passing these here make the bindings available application-wide | ||
bootstrap(App, [ | ||
//appServicesInjectables, // alternative way of filling the injector with all the classes we want to be able to inject | ||
ROUTER_PROVIDERS, | ||
HTTP_PROVIDERS, | ||
provide(LocationStrategy, { useClass: PathLocationStrategy }) // enables the following: /#/<component_name> rather than /<component_name> | ||
//alternative | ||
//provide(LocationStrategy, { useClass: HTML5LocationStrategy }) // enable HTML5 history API location strategy | ||
|
||
]).then( | ||
(success:any) => console.log("Bootstrap successful"), | ||
(error:any) => console.error(error) | ||
); |
1 change: 0 additions & 1 deletion
1
app/templates/applicationFiles/app/core/core.bootstrap.template.html
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.