committed by
Igor Minar
parent
344a5ca545
commit
9bbf009dff
@@ -1,7 +1,7 @@
|
||||
// #docregion
|
||||
import { Component } from '@angular/core';
|
||||
@Component({
|
||||
selector: 'my-app',
|
||||
selector: 'app-root',
|
||||
templateUrl: './app.component.html'
|
||||
})
|
||||
export class AppComponent { }
|
||||
|
||||
@@ -6,8 +6,8 @@ import { AppRoutingModule } from './app-routing.module';
|
||||
|
||||
import { AboutComponent } from './about.component';
|
||||
import { BannerComponent } from './banner.component';
|
||||
import { HeroService,
|
||||
UserService } from './model';
|
||||
import { UserService } from './model/user.service';
|
||||
import { HeroService } from './model/hero.service';
|
||||
import { TwainService } from './shared/twain.service';
|
||||
import { WelcomeComponent } from './welcome.component';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// #docregion
|
||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
|
||||
import { Hero } from '../model';
|
||||
import { Hero } from '../model/hero';
|
||||
|
||||
// #docregion component
|
||||
@Component({
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
import { Hero, HeroService } from '../model';
|
||||
import { Hero } from '../model/hero';
|
||||
import { HeroService } from '../model/hero.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-dashboard',
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Component, Input, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import 'rxjs/add/operator/map';
|
||||
|
||||
import { Hero } from '../model';
|
||||
import { Hero } from '../model/hero';
|
||||
import { HeroDetailService } from './hero-detail.service';
|
||||
|
||||
// #docregion prototype
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
import { Hero, HeroService } from '../model';
|
||||
import { Hero } from '../model/hero';
|
||||
import { HeroService } from '../model/hero.service';
|
||||
|
||||
// #docregion prototype
|
||||
@Injectable()
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
import { Hero, HeroService } from '../model';
|
||||
import { Hero } from '../model/hero';
|
||||
import { HeroService } from '../model/hero.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-heroes',
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
// Model barrel
|
||||
export * from './hero';
|
||||
export * from './hero.service';
|
||||
export * from './http-hero.service';
|
||||
export * from './test-heroes';
|
||||
|
||||
export * from './user.service';
|
||||
@@ -1 +0,0 @@
|
||||
export * from './fake-hero.service';
|
||||
@@ -1,6 +1,7 @@
|
||||
// #docregion
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { UserService } from './model';
|
||||
|
||||
import { UserService } from './model/user.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-welcome',
|
||||
|
||||
@@ -1,27 +1,14 @@
|
||||
<!-- Run the test app-->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/">
|
||||
<title>App Under Test</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
|
||||
<!-- Polyfills -->
|
||||
<script src="node_modules/core-js/client/shim.min.js"></script>
|
||||
|
||||
<script src="node_modules/zone.js/dist/zone.js"></script>
|
||||
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
||||
|
||||
<script src="systemjs.config.js"></script>
|
||||
<script src="systemjs.config.extras.js"></script>
|
||||
<script>
|
||||
System.import('main.js').catch(function(err){ console.error(err); });
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<my-app>Loading...</my-app>
|
||||
<app-root></app-root>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
// main app entry point
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
import { AppModule } from './app/app.module';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
// #docregion
|
||||
/** App specific SystemJS configuration */
|
||||
System.config({
|
||||
packages: {
|
||||
// barrels
|
||||
'app/model': {main:'index.js', defaultExtension:'js'},
|
||||
'app/model/testing': {main:'index.js', defaultExtension:'js'}
|
||||
}
|
||||
});
|
||||
@@ -1,5 +1,5 @@
|
||||
declare namespace jasmine {
|
||||
interface Matchers {
|
||||
interface Matchers<T> {
|
||||
toHaveText(actual: any, expectationFailOutput?: any): jasmine.CustomMatcher;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user