This repository has been archived by the owner on Jun 1, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 511
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
921d6ab
commit 984dc7c
Showing
8 changed files
with
123 additions
and
103 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
define(["exports", "aurelia-router"], function (exports, _aureliaRouter) { | ||
System.register(["aurelia-router"], function (_export) { | ||
"use strict"; | ||
|
||
var Router = _aureliaRouter.Router; | ||
var App = (function () { | ||
var App = function App(router) { | ||
this.router = router; | ||
this.router.configure(function (config) { | ||
config.title = "Aurelia"; | ||
config.map([{ route: ["", "welcome"], moduleId: "welcome", nav: true, title: "Welcome" }, { route: "flickr", moduleId: "flickr", nav: true }, { route: "child-router", moduleId: "child-router", nav: true, title: "Child Router" }]); | ||
}); | ||
}; | ||
var Router, App; | ||
return { | ||
setters: [function (_aureliaRouter) { | ||
Router = _aureliaRouter.Router; | ||
}], | ||
execute: function () { | ||
App = function App(router) { | ||
this.router = router; | ||
this.router.configure(function (config) { | ||
config.title = "Aurelia"; | ||
config.map([{ route: ["", "welcome"], moduleId: "welcome", nav: true, title: "Welcome" }, { route: "flickr", moduleId: "flickr", nav: true }, { route: "child-router", moduleId: "child-router", nav: true, title: "Child Router" }]); | ||
}); | ||
}; | ||
|
||
App.inject = function () { | ||
return [Router]; | ||
}; | ||
App.inject = function () { | ||
return [Router]; | ||
}; | ||
|
||
return App; | ||
})(); | ||
|
||
exports.App = App; | ||
_export("App", App); | ||
} | ||
}; | ||
}); |
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 |
---|---|---|
@@ -1,22 +1,25 @@ | ||
define(["exports", "aurelia-router"], function (exports, _aureliaRouter) { | ||
System.register(["aurelia-router"], function (_export) { | ||
"use strict"; | ||
|
||
var Router = _aureliaRouter.Router; | ||
var Welcome = (function () { | ||
var Welcome = function Welcome(router) { | ||
this.heading = "Child Router"; | ||
this.router = router; | ||
router.configure(function (config) { | ||
config.map([{ route: ["", "welcome"], moduleId: "welcome", nav: true, title: "Welcome" }, { route: "flickr", moduleId: "flickr", nav: true }, { route: "child-router", moduleId: "child-router", nav: true, title: "Child Router" }]); | ||
}); | ||
}; | ||
var Router, Welcome; | ||
return { | ||
setters: [function (_aureliaRouter) { | ||
Router = _aureliaRouter.Router; | ||
}], | ||
execute: function () { | ||
Welcome = function Welcome(router) { | ||
this.heading = "Child Router"; | ||
this.router = router; | ||
router.configure(function (config) { | ||
config.map([{ route: ["", "welcome"], moduleId: "welcome", nav: true, title: "Welcome" }, { route: "flickr", moduleId: "flickr", nav: true }, { route: "child-router", moduleId: "child-router", nav: true, title: "Child Router" }]); | ||
}); | ||
}; | ||
|
||
Welcome.inject = function () { | ||
return [Router]; | ||
}; | ||
Welcome.inject = function () { | ||
return [Router]; | ||
}; | ||
|
||
return Welcome; | ||
})(); | ||
|
||
exports.Welcome = Welcome; | ||
_export("Welcome", Welcome); | ||
} | ||
}; | ||
}); |
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 |
---|---|---|
@@ -1,35 +1,35 @@ | ||
define(["exports", "aurelia-http-client"], function (exports, _aureliaHttpClient) { | ||
System.register(["aurelia-http-client"], function (_export) { | ||
"use strict"; | ||
|
||
var HttpClient = _aureliaHttpClient.HttpClient; | ||
|
||
|
||
var url = "http://api.flickr.com/services/feeds/photos_public.gne?tags=rainier&tagmode=any&format=json"; | ||
|
||
var Flickr = (function () { | ||
var Flickr = function Flickr(http) { | ||
this.heading = "Flickr"; | ||
this.images = []; | ||
this.http = http; | ||
}; | ||
|
||
Flickr.inject = function () { | ||
return [HttpClient]; | ||
}; | ||
|
||
Flickr.prototype.activate = function () { | ||
var _this = this; | ||
return this.http.jsonp(url).then(function (response) { | ||
_this.images = response.content.items; | ||
}); | ||
}; | ||
|
||
Flickr.prototype.canDeactivate = function () { | ||
return confirm("Are you sure you want to leave?"); | ||
}; | ||
|
||
return Flickr; | ||
})(); | ||
|
||
exports.Flickr = Flickr; | ||
var HttpClient, url, Flickr; | ||
return { | ||
setters: [function (_aureliaHttpClient) { | ||
HttpClient = _aureliaHttpClient.HttpClient; | ||
}], | ||
execute: function () { | ||
url = "http://api.flickr.com/services/feeds/photos_public.gne?tags=rainier&tagmode=any&format=json"; | ||
Flickr = function Flickr(http) { | ||
this.heading = "Flickr"; | ||
this.images = []; | ||
this.http = http; | ||
}; | ||
|
||
Flickr.inject = function () { | ||
return [HttpClient]; | ||
}; | ||
|
||
Flickr.prototype.activate = function () { | ||
var _this = this; | ||
return this.http.jsonp(url).then(function (response) { | ||
_this.images = response.content.items; | ||
}); | ||
}; | ||
|
||
Flickr.prototype.canDeactivate = function () { | ||
return confirm("Are you sure you want to leave?"); | ||
}; | ||
|
||
_export("Flickr", Flickr); | ||
} | ||
}; | ||
}); |
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 |
---|---|---|
@@ -1,16 +1,19 @@ | ||
define(["exports", "aurelia-framework"], function (exports, _aureliaFramework) { | ||
System.register(["aurelia-framework"], function (_export) { | ||
"use strict"; | ||
|
||
var Property = _aureliaFramework.Property; | ||
var NavBar = (function () { | ||
var NavBar = function NavBar() {}; | ||
var Property, NavBar; | ||
return { | ||
setters: [function (_aureliaFramework) { | ||
Property = _aureliaFramework.Property; | ||
}], | ||
execute: function () { | ||
NavBar = function NavBar() {}; | ||
|
||
NavBar.annotations = function () { | ||
return [new Property("router")]; | ||
}; | ||
NavBar.annotations = function () { | ||
return [new Property("router")]; | ||
}; | ||
|
||
return NavBar; | ||
})(); | ||
|
||
exports.NavBar = NavBar; | ||
_export("NavBar", NavBar); | ||
} | ||
}; | ||
}); |
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 |
---|---|---|
@@ -1,32 +1,35 @@ | ||
define(["exports"], function (exports) { | ||
System.register([], function (_export) { | ||
"use strict"; | ||
|
||
var _classProps = function (child, staticProps, instanceProps) { | ||
if (staticProps) Object.defineProperties(child, staticProps); | ||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps); | ||
}; | ||
var _prototypeProperties, Welcome; | ||
return { | ||
setters: [], | ||
execute: function () { | ||
_prototypeProperties = function (child, staticProps, instanceProps) { | ||
if (staticProps) Object.defineProperties(child, staticProps); | ||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps); | ||
}; | ||
|
||
var Welcome = (function () { | ||
var Welcome = function Welcome() { | ||
this.heading = "Welcome to the Aurelia Navigation App!"; | ||
this.firstName = "John"; | ||
this.lastName = "Doe"; | ||
}; | ||
Welcome = function Welcome() { | ||
this.heading = "Welcome to the Aurelia Navigation App!"; | ||
this.firstName = "John"; | ||
this.lastName = "Doe"; | ||
}; | ||
|
||
Welcome.prototype.welcome = function () { | ||
alert("Welcome, " + this.fullName + "!"); | ||
}; | ||
Welcome.prototype.welcome = function () { | ||
alert("Welcome, " + this.fullName + "!"); | ||
}; | ||
|
||
_classProps(Welcome, null, { | ||
fullName: { | ||
get: function () { | ||
return "" + this.firstName + " " + this.lastName; | ||
_prototypeProperties(Welcome, null, { | ||
fullName: { | ||
get: function () { | ||
return "" + this.firstName + " " + this.lastName; | ||
}, | ||
enumerable: true | ||
} | ||
} | ||
}); | ||
|
||
return Welcome; | ||
})(); | ||
}); | ||
|
||
exports.Welcome = Welcome; | ||
_export("Welcome", Welcome); | ||
} | ||
}; | ||
}); |
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 |
---|---|---|
@@ -1 +1 @@ | ||
{"project":{},"files":{},"modules":{},"classes":{},"classitems":[],"warnings":[]} | ||
{"classes":[],"methods":[],"properties":[],"events":[]} |
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