docs:remove many generated js files and prevent with .gitignore

This commit is contained in:
Ward Bell 2016-02-25 13:37:30 -08:00
parent 9a7294c25b
commit 44ec77c34a
28 changed files with 5 additions and 967 deletions

View File

@ -1,39 +0,0 @@
System.register(['angular2/core'], function(exports_1) {
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1;
var HelloWorld;
return {
setters:[
function (core_1_1) {
core_1 = core_1_1;
}],
execute: function() {
HelloWorld = (function () {
function HelloWorld() {
// Declaring the variable for binding with initial value
this.yourName = '';
}
HelloWorld = __decorate([
core_1.Component({
// Declare the tag name in index.html to where the component attaches
selector: 'hello-world',
// Location of the template for this component
templateUrl: 'app/hello_world.html'
}),
__metadata('design:paramtypes', [])
], HelloWorld);
return HelloWorld;
})();
exports_1("HelloWorld", HelloWorld);
}
}
});
//# sourceMappingURL=hello_world.js.map

View File

@ -1,16 +0,0 @@
System.register(['angular2/platform/browser', './hello_world'], function(exports_1) {
var browser_1, hello_world_1;
return {
setters:[
function (browser_1_1) {
browser_1 = browser_1_1;
},
function (hello_world_1_1) {
hello_world_1 = hello_world_1_1;
}],
execute: function() {
browser_1.bootstrap(hello_world_1.HelloWorld);
}
}
});
//# sourceMappingURL=main.js.map

View File

@ -1,56 +0,0 @@
System.register(['angular2/core', './ui_tabs'], function(exports_1) {
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1, ui_tabs_1;
var Detail, DiDemo;
return {
setters:[
function (core_1_1) {
core_1 = core_1_1;
},
function (ui_tabs_1_1) {
ui_tabs_1 = ui_tabs_1_1;
}],
execute: function() {
Detail = (function () {
function Detail() {
}
return Detail;
})();
DiDemo = (function () {
function DiDemo() {
this.details = [];
this.id = 0;
}
DiDemo.prototype.addDetail = function () {
this.id++;
this.details.push({
title: "Detail " + this.id,
text: "Some detail text for " + this.id + "..."
});
};
DiDemo.prototype.removeDetail = function (detail) {
this.details = this.details.filter(function (d) { return d !== detail; });
};
DiDemo = __decorate([
core_1.Component({
selector: 'di-demo',
template: "\n <h4>Tabs Demo</h4>\n <ui-tabs>\n <template ui-pane title='Overview' active=\"true\">\n You have {{details.length}} details.\n </template>\n <template *ngFor=\"#detail of details\" ui-pane [title]=\"detail.title\">\n {{detail.text}} <br><br>\n <button class=\"btn\" (click)=\"removeDetail(detail)\">Remove</button>\n </template>\n <template ui-pane title='Summary'>\n Next last ID is {{id}}.\n </template>\n </ui-tabs>\n <hr>\n <button class=\"btn\" (click)=\"addDetail()\">Add Detail</button>\n ",
directives: [ui_tabs_1.UiTabs, ui_tabs_1.UiPane]
}),
__metadata('design:paramtypes', [])
], DiDemo);
return DiDemo;
})();
exports_1("DiDemo", DiDemo);
}
}
});
//# sourceMappingURL=di_demo.js.map

View File

@ -1,16 +0,0 @@
System.register(['angular2/platform/browser', './di_demo'], function(exports_1) {
var browser_1, di_demo_1;
return {
setters:[
function (browser_1_1) {
browser_1 = browser_1_1;
},
function (di_demo_1_1) {
di_demo_1 = di_demo_1_1;
}],
execute: function() {
browser_1.bootstrap(di_demo_1.DiDemo);
}
}
});
//# sourceMappingURL=main.js.map

View File

@ -1,85 +0,0 @@
System.register(['angular2/core'], function(exports_1) {
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1;
var UiPane, UiTabs;
return {
setters:[
function (core_1_1) {
core_1 = core_1_1;
}],
execute: function() {
UiPane = (function () {
function UiPane(viewContainer, templateRef) {
this.viewContainer = viewContainer;
this.templateRef = templateRef;
this._active = false;
}
Object.defineProperty(UiPane.prototype, "active", {
get: function () {
return this._active;
},
set: function (active) {
if (active == this._active)
return;
this._active = active;
if (active) {
this.viewContainer.createEmbeddedView(this.templateRef);
}
else {
this.viewContainer.remove(0);
}
},
enumerable: true,
configurable: true
});
__decorate([
core_1.Input(),
__metadata('design:type', String)
], UiPane.prototype, "title", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', Boolean),
__metadata('design:paramtypes', [Boolean])
], UiPane.prototype, "active", null);
UiPane = __decorate([
core_1.Directive({
selector: '[ui-pane]'
}),
__metadata('design:paramtypes', [core_1.ViewContainerRef, core_1.TemplateRef])
], UiPane);
return UiPane;
})();
exports_1("UiPane", UiPane);
UiTabs = (function () {
function UiTabs() {
}
UiTabs.prototype.select = function (pane) {
this.panes.toArray().forEach(function (p) { return p.active = p == pane; });
};
__decorate([
core_1.ContentChildren(UiPane),
__metadata('design:type', core_1.QueryList)
], UiTabs.prototype, "panes", void 0);
UiTabs = __decorate([
core_1.Component({
selector: 'ui-tabs',
template: "\n <ul class=\"nav nav-tabs\">\n <li *ngFor=\"var pane of panes\"\n (click)=\"select(pane)\"\n role=\"presentation\" [class.active]=\"pane.active\">\n <a>{{pane.title}}</a>\n </li>\n </ul>\n <ng-content></ng-content>\n ",
styles: ['a { cursor: pointer; cursor: hand; }']
}),
__metadata('design:paramtypes', [])
], UiTabs);
return UiTabs;
})();
exports_1("UiTabs", UiTabs);
}
}
});
//# sourceMappingURL=ui_tabs.js.map

View File

@ -1,16 +0,0 @@
System.register(['angular2/platform/browser', './todo_app'], function(exports_1) {
var browser_1, todo_app_1;
return {
setters:[
function (browser_1_1) {
browser_1 = browser_1_1;
},
function (todo_app_1_1) {
todo_app_1 = todo_app_1_1;
}],
execute: function() {
browser_1.bootstrap(todo_app_1.TodoApp);
}
}
});
//# sourceMappingURL=main.js.map

View File

@ -1,8 +0,0 @@
System.register([], function(exports_1) {
return {
setters:[],
execute: function() {
}
}
});
//# sourceMappingURL=todo.js.map

View File

@ -1,66 +0,0 @@
System.register(['angular2/core', './todo_list', './todo_form'], function(exports_1) {
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1, todo_list_1, todo_form_1;
var TodoApp;
return {
setters:[
function (core_1_1) {
core_1 = core_1_1;
},
function (todo_list_1_1) {
todo_list_1 = todo_list_1_1;
},
function (todo_form_1_1) {
todo_form_1 = todo_form_1_1;
}],
execute: function() {
TodoApp = (function () {
function TodoApp() {
this.todos = [
{ text: 'learn angular', done: true },
{ text: 'build an angular app', done: false }
];
}
Object.defineProperty(TodoApp.prototype, "remaining", {
get: function () {
return this.todos.reduce(function (count, todo) { return count + +!todo.done; }, 0);
},
enumerable: true,
configurable: true
});
TodoApp.prototype.archive = function () {
var _this = this;
var oldTodos = this.todos;
this.todos = [];
oldTodos.forEach(function (todo) {
if (!todo.done)
_this.todos.push(todo);
});
};
TodoApp.prototype.addTask = function (task) {
this.todos.push(task);
};
TodoApp = __decorate([
core_1.Component({
selector: 'todo-app',
template: "\n <h2>Todo</h2>\n <span>{{remaining}} of {{todos.length}} remaining</span>\n [ <a (click)=\"archive()\">archive</a> ]\n\n <todo-list [todos]=\"todos\"></todo-list>\n <todo-form (newTask)=\"addTask($event)\"></todo-form>",
styles: ['a { cursor: pointer; cursor: hand; }'],
directives: [todo_list_1.TodoList, todo_form_1.TodoForm]
}),
__metadata('design:paramtypes', [])
], TodoApp);
return TodoApp;
})();
exports_1("TodoApp", TodoApp);
}
}
});
//# sourceMappingURL=todo_app.js.map

View File

@ -1,47 +0,0 @@
System.register(['angular2/core'], function(exports_1) {
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1;
var TodoForm;
return {
setters:[
function (core_1_1) {
core_1 = core_1_1;
}],
execute: function() {
TodoForm = (function () {
function TodoForm() {
this.newTask = new core_1.EventEmitter();
this.task = '';
}
TodoForm.prototype.addTodo = function () {
if (this.task) {
this.newTask.next({ text: this.task, done: false });
}
this.task = '';
};
__decorate([
core_1.Output(),
__metadata('design:type', Object)
], TodoForm.prototype, "newTask", void 0);
TodoForm = __decorate([
core_1.Component({
selector: 'todo-form',
template: "\n <form (ngSubmit)=\"addTodo()\">\n <input type=\"text\" [(ngModel)]=\"task\" size=\"30\"\n placeholder=\"add new todo here\">\n <input class=\"btn-primary\" type=\"submit\" value=\"add\">\n </form>"
}),
__metadata('design:paramtypes', [])
], TodoForm);
return TodoForm;
})();
exports_1("TodoForm", TodoForm);
}
}
});
//# sourceMappingURL=todo_form.js.map

View File

@ -1,41 +0,0 @@
System.register(['angular2/core'], function(exports_1) {
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1;
var TodoList;
return {
setters:[
function (core_1_1) {
core_1 = core_1_1;
}],
execute: function() {
TodoList = (function () {
function TodoList() {
}
__decorate([
core_1.Input(),
__metadata('design:type', Array)
], TodoList.prototype, "todos", void 0);
TodoList = __decorate([
core_1.Component({
selector: 'todo-list',
styles: ["\n .done-true {\n text-decoration: line-through;\n color: grey;\n }"
],
template: "\n <ul class=\"unstyled\">\n <li *ngFor=\"#todo of todos\">\n <input type=\"checkbox\" [(ngModel)]=\"todo.done\">\n <span class=\"done-{{todo.done}}\">{{todo.text}}</span>\n </li>\n </ul>"
}),
__metadata('design:paramtypes', [])
], TodoList);
return TodoList;
})();
exports_1("TodoList", TodoList);
}
}
});
//# sourceMappingURL=todo_list.js.map

View File

@ -0,0 +1 @@
**/*.js

View File

@ -0,0 +1 @@
**/*.js

View File

@ -0,0 +1 @@
**/*.js

View File

@ -0,0 +1 @@
**/*.js

View File

@ -0,0 +1 @@
**/*.js

View File

@ -1,54 +0,0 @@
System.register(['angular2/core', './hero.service', './heroes.component', 'angular2/router'], function(exports_1) {
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1, hero_service_1, heroes_component_1, router_1;
var AppComponent;
return {
setters:[
function (core_1_1) {
core_1 = core_1_1;
},
function (hero_service_1_1) {
hero_service_1 = hero_service_1_1;
},
function (heroes_component_1_1) {
heroes_component_1 = heroes_component_1_1;
},
function (router_1_1) {
router_1 = router_1_1;
}],
execute: function() {
// #docregion
AppComponent = (function () {
function AppComponent() {
this.title = 'Tour of Heroes';
}
AppComponent = __decorate([
core_1.Component({
selector: 'my-app',
template: "\n <h1>{{title}}</h1>\n <my-heroes></my-heroes>\n ",
directives: [heroes_component_1.HeroesComponent],
providers: [
// #enddocregion
router_1.ROUTER_PROVIDERS,
// #docregion
hero_service_1.HeroService
]
}),
__metadata('design:paramtypes', [])
], AppComponent);
return AppComponent;
})();
exports_1("AppComponent", AppComponent);
}
}
});
// #enddocregion
//# sourceMappingURL=app.component.1.js.map

View File

@ -1,61 +0,0 @@
System.register(['angular2/core', 'angular2/router', './hero.service', './heroes.component'], function(exports_1) {
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1, router_1, hero_service_1, heroes_component_1;
var AppComponent;
return {
setters:[
function (core_1_1) {
core_1 = core_1_1;
},
function (router_1_1) {
router_1 = router_1_1;
},
function (hero_service_1_1) {
hero_service_1 = hero_service_1_1;
},
function (heroes_component_1_1) {
heroes_component_1 = heroes_component_1_1;
}],
execute: function() {
AppComponent = (function () {
function AppComponent() {
this.title = 'Tour of Heroes';
}
AppComponent = __decorate([
core_1.Component({
selector: 'my-app',
// #docregion template
template: "\n <h1>{{title}}</h1>\n <a [routerLink]=\"['Heroes']\">Heroes</a>\n <router-outlet></router-outlet>\n ",
// #enddocregion template
// #docregion directives-and-providers
directives: [router_1.ROUTER_DIRECTIVES],
providers: [
router_1.ROUTER_PROVIDERS,
hero_service_1.HeroService
]
}),
router_1.RouteConfig([
{
path: '/heroes',
name: 'Heroes',
component: heroes_component_1.HeroesComponent
}
]),
__metadata('design:paramtypes', [])
], AppComponent);
return AppComponent;
})();
exports_1("AppComponent", AppComponent);
}
}
});
// #enddocregion
//# sourceMappingURL=app.component.2.js.map

View File

@ -1,85 +0,0 @@
System.register(['angular2/core', 'angular2/router', './hero.service', './dashboard.component', './heroes.component', './hero-detail.component'], function(exports_1) {
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1, router_1, hero_service_1, dashboard_component_1, heroes_component_1, hero_detail_component_1;
var AppComponent;
return {
setters:[
function (core_1_1) {
core_1 = core_1_1;
},
function (router_1_1) {
router_1 = router_1_1;
},
function (hero_service_1_1) {
hero_service_1 = hero_service_1_1;
},
function (dashboard_component_1_1) {
dashboard_component_1 = dashboard_component_1_1;
},
function (heroes_component_1_1) {
heroes_component_1 = heroes_component_1_1;
},
function (hero_detail_component_1_1) {
hero_detail_component_1 = hero_detail_component_1_1;
}],
execute: function() {
// #enddocregion hero-detail-import
AppComponent = (function () {
function AppComponent() {
this.title = 'Tour of Heroes';
}
AppComponent = __decorate([
core_1.Component({
selector: 'my-app',
// #docregion template
template: "\n <h1>{{title}}</h1>\n <nav>\n <a [routerLink]=\"['Dashboard']\">Dashboard</a>\n <a [routerLink]=\"['Heroes']\">Heroes</a>\n </nav>\n <router-outlet></router-outlet>\n ",
// #enddocregion template
// #docregion style-urls
styleUrls: ['app/app.component.css'],
// #enddocregion style-urls
directives: [router_1.ROUTER_DIRECTIVES],
providers: [
router_1.ROUTER_PROVIDERS,
hero_service_1.HeroService
]
}),
router_1.RouteConfig([
// #docregion dashboard-route
{
path: '/dashboard',
name: 'Dashboard',
component: dashboard_component_1.DashboardComponent,
useAsDefault: true
},
// #enddocregion dashboard-route
// #docregion hero-detail-route
{
path: '/detail/:id',
name: 'HeroDetail',
component: hero_detail_component_1.HeroDetailComponent
},
// #enddocregion hero-detail-route
{
path: '/heroes',
name: 'Heroes',
component: heroes_component_1.HeroesComponent
}
]),
__metadata('design:paramtypes', [])
], AppComponent);
return AppComponent;
})();
exports_1("AppComponent", AppComponent);
}
}
});
// #enddocregion
//# sourceMappingURL=app.component.js.map

View File

@ -1,35 +0,0 @@
System.register(['angular2/core'], function(exports_1) {
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1;
var DashboardComponent;
return {
setters:[
function (core_1_1) {
core_1 = core_1_1;
}],
execute: function() {
DashboardComponent = (function () {
function DashboardComponent() {
}
DashboardComponent = __decorate([
core_1.Component({
selector: 'my-dashboard',
template: '<h3>My Dashboard</h3>'
}),
__metadata('design:paramtypes', [])
], DashboardComponent);
return DashboardComponent;
})();
exports_1("DashboardComponent", DashboardComponent);
}
}
});
//# sourceMappingURL=dashboard.component.1.js.map

View File

@ -1,48 +0,0 @@
System.register(['angular2/core', './hero.service'], function(exports_1) {
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1, hero_service_1;
var DashboardComponent;
return {
setters:[
function (core_1_1) {
core_1 = core_1_1;
},
function (hero_service_1_1) {
hero_service_1 = hero_service_1_1;
}],
execute: function() {
// #enddocregion imports
DashboardComponent = (function () {
function DashboardComponent(_heroService) {
this._heroService = _heroService;
this.heroes = [];
}
DashboardComponent.prototype.ngOnInit = function () {
var _this = this;
this._heroService.getHeroes()
.then(function (heroes) { return _this.heroes = heroes.slice(1, 5); });
};
DashboardComponent.prototype.gotoDetail = function () { };
DashboardComponent = __decorate([
core_1.Component({
selector: 'my-dashboard',
templateUrl: 'app/dashboard.component.html'
}),
__metadata('design:paramtypes', [hero_service_1.HeroService])
], DashboardComponent);
return DashboardComponent;
})();
exports_1("DashboardComponent", DashboardComponent);
}
}
});
// #enddocregion component
//# sourceMappingURL=dashboard.component.2.js.map

View File

@ -1,59 +0,0 @@
System.register(['angular2/core', 'angular2/router', './hero.service'], function(exports_1) {
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1, router_1, hero_service_1;
var DashboardComponent;
return {
setters:[
function (core_1_1) {
core_1 = core_1_1;
},
function (router_1_1) {
router_1 = router_1_1;
},
function (hero_service_1_1) {
hero_service_1 = hero_service_1_1;
}],
execute: function() {
DashboardComponent = (function () {
// #docregion ctor
function DashboardComponent(_router, _heroService) {
this._router = _router;
this._heroService = _heroService;
this.heroes = [];
}
// #enddocregion ctor
DashboardComponent.prototype.ngOnInit = function () {
var _this = this;
this._heroService.getHeroes()
.then(function (heroes) { return _this.heroes = heroes.slice(1, 5); });
};
// #docregion goto-detail
DashboardComponent.prototype.gotoDetail = function (hero) {
var link = ['HeroDetail', { id: hero.id }];
this._router.navigate(link);
};
DashboardComponent = __decorate([
core_1.Component({
selector: 'my-dashboard',
templateUrl: 'app/dashboard.component.html',
// #docregion css
styleUrls: ['app/dashboard.component.css']
}),
__metadata('design:paramtypes', [router_1.Router, hero_service_1.HeroService])
], DashboardComponent);
return DashboardComponent;
})();
exports_1("DashboardComponent", DashboardComponent);
}
}
});
// #enddocregion
//# sourceMappingURL=dashboard.component.js.map

View File

@ -1,68 +0,0 @@
System.register(['angular2/core', 'angular2/router', './hero.service'], function(exports_1) {
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1, router_1, hero_service_1;
var HeroDetailComponent;
return {
setters:[
function (core_1_1) {
core_1 = core_1_1;
},
function (router_1_1) {
router_1 = router_1_1;
},
function (hero_service_1_1) {
hero_service_1 = hero_service_1_1;
}],
execute: function() {
// #enddocregion import-hero-service
// #docregion extract-template
HeroDetailComponent = (function () {
// #docregion ctor
function HeroDetailComponent(_heroService, _routeParams) {
this._heroService = _heroService;
this._routeParams = _routeParams;
}
// #enddocregion ctor
// #docregion ng-oninit
HeroDetailComponent.prototype.ngOnInit = function () {
var _this = this;
// #docregion get-id
var id = +this._routeParams.get('id');
// #enddocregion get-id
this._heroService.getHero(id)
.then(function (hero) { return _this.hero = hero; });
};
// #enddocregion ng-oninit
// #docregion go-back
HeroDetailComponent.prototype.goBack = function () {
window.history.back();
};
HeroDetailComponent = __decorate([
core_1.Component({
selector: 'my-hero-detail',
// #docregion template-url
templateUrl: 'app/hero-detail.component.html',
// #enddocregion template-url
// #enddocregion v2
styleUrls: ['app/hero-detail.component.css'],
inputs: ['hero']
}),
__metadata('design:paramtypes', [hero_service_1.HeroService, router_1.RouteParams])
], HeroDetailComponent);
return HeroDetailComponent;
})();
exports_1("HeroDetailComponent", HeroDetailComponent);
}
}
});
// #enddocregion v2
// #enddocregion
//# sourceMappingURL=hero-detail.component.js.map

View File

@ -1,8 +0,0 @@
System.register([], function(exports_1) {
return {
setters:[],
execute: function() {
}
}
});
//# sourceMappingURL=hero.js.map

View File

@ -1,51 +0,0 @@
System.register(['./mock-heroes', 'angular2/core'], function(exports_1) {
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var mock_heroes_1, core_1;
var HeroService;
return {
setters:[
function (mock_heroes_1_1) {
mock_heroes_1 = mock_heroes_1_1;
},
function (core_1_1) {
core_1 = core_1_1;
}],
execute: function() {
HeroService = (function () {
function HeroService() {
}
HeroService.prototype.getHeroes = function () {
return Promise.resolve(mock_heroes_1.HEROES);
};
// See the "Take it slow" appendix
HeroService.prototype.getHeroesSlowly = function () {
return new Promise(function (resolve) {
return setTimeout(function () { return resolve(mock_heroes_1.HEROES); }, 2000);
} // 2 seconds
// 2 seconds
);
};
//#docregion get-hero
HeroService.prototype.getHero = function (id) {
return Promise.resolve(mock_heroes_1.HEROES).then(function (heroes) { return heroes.filter(function (hero) { return hero.id === id; })[0]; });
};
HeroService = __decorate([
core_1.Injectable(),
__metadata('design:paramtypes', [])
], HeroService);
return HeroService;
})();
exports_1("HeroService", HeroService);
}
}
});
// #enddocregion
//# sourceMappingURL=hero.service.js.map

View File

@ -1,65 +0,0 @@
System.register(['angular2/core', 'angular2/router', './hero-detail.component', './hero.service'], function(exports_1) {
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1, router_1, hero_detail_component_1, hero_service_1;
var HeroesComponent;
return {
setters:[
function (core_1_1) {
core_1 = core_1_1;
},
function (router_1_1) {
router_1 = router_1_1;
},
function (hero_detail_component_1_1) {
hero_detail_component_1 = hero_detail_component_1_1;
},
function (hero_service_1_1) {
hero_service_1 = hero_service_1_1;
}],
execute: function() {
// #docregion metadata
// #docregion heroes-component-renaming
HeroesComponent = (function () {
function HeroesComponent(_router, _heroService) {
this._router = _router;
this._heroService = _heroService;
}
HeroesComponent.prototype.getHeroes = function () {
var _this = this;
this._heroService.getHeroes().then(function (heroes) { return _this.heroes = heroes; });
};
HeroesComponent.prototype.ngOnInit = function () {
this.getHeroes();
};
HeroesComponent.prototype.onSelect = function (hero) { this.selectedHero = hero; };
HeroesComponent.prototype.gotoDetail = function () {
this._router.navigate(['HeroDetail', { id: this.selectedHero.id }]);
};
HeroesComponent = __decorate([
core_1.Component({
selector: 'my-heroes',
// #enddocregion heroes-component-renaming
templateUrl: 'app/heroes.component.html',
styleUrls: ['app/heroes.component.css'],
directives: [hero_detail_component_1.HeroDetailComponent]
}),
__metadata('design:paramtypes', [router_1.Router, hero_service_1.HeroService])
], HeroesComponent);
return HeroesComponent;
})();
exports_1("HeroesComponent", HeroesComponent);
}
}
});
// #enddocregion heroes-component-renaming
// #enddocregion class
// #enddocregion
//# sourceMappingURL=heroes.component.js.map

View File

@ -1,16 +0,0 @@
System.register(['angular2/platform/browser', './app.component'], function(exports_1) {
var browser_1, app_component_1;
return {
setters:[
function (browser_1_1) {
browser_1 = browser_1_1;
},
function (app_component_1_1) {
app_component_1 = app_component_1_1;
}],
execute: function() {
browser_1.bootstrap(app_component_1.AppComponent);
}
}
});
//# sourceMappingURL=main.js.map

View File

@ -1,22 +0,0 @@
System.register([], function(exports_1) {
var HEROES;
return {
setters:[],
execute: function() {
exports_1("HEROES", HEROES = [
{ "id": 11, "name": "Mr. Nice" },
{ "id": 12, "name": "Narco" },
{ "id": 13, "name": "Bombasto" },
{ "id": 14, "name": "Celeritas" },
{ "id": 15, "name": "Magneta" },
{ "id": 16, "name": "RubberMan" },
{ "id": 17, "name": "Dynama" },
{ "id": 18, "name": "Dr IQ" },
{ "id": 19, "name": "Magma" },
{ "id": 20, "name": "Tornado" }
]);
}
}
});
// #enddocregion
//# sourceMappingURL=mock-heroes.js.map

View File

@ -1,6 +1 @@
typings
**/*.js
**/*.map
node_modules
jspm_packages
bower_components