test: move platform-server integration test (#22810)

Now it lives in our standard location for tests against npm packages

PR Close #22810
This commit is contained in:
Alex Eagle
2018-04-13 14:57:58 -07:00
committed by Igor Minar
parent 29b838c35d
commit 102ed3b03c
24 changed files with 13 additions and 32 deletions

View File

@ -0,0 +1,20 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {NgModule} from '@angular/core';
import {ServerModule} from '@angular/platform-server';
import {HelloWorldModule} from './app';
import {HelloWorldComponent} from './hello-world.component';
@NgModule({
bootstrap: [HelloWorldComponent],
imports: [HelloWorldModule, ServerModule],
})
export class HelloWorldServerModule {
}

View File

@ -0,0 +1,20 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {HelloWorldComponent} from './hello-world.component';
@NgModule({
declarations: [HelloWorldComponent],
bootstrap: [HelloWorldComponent],
imports: [BrowserModule.withServerTransition({appId: 'hlw'})],
})
export class HelloWorldModule {
}

View File

@ -0,0 +1,17 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import 'zone.js/dist/zone.js';
import {enableProdMode} from '@angular/core';
import {platformBrowser} from '@angular/platform-browser';
import {HelloWorldModuleNgFactory} from './app.ngfactory';
window['doBootstrap'] = function() {
platformBrowser().bootstrapModuleFactory(HelloWorldModuleNgFactory);
};

View File

@ -0,0 +1,24 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {Component} from '@angular/core';
@Component({
selector: 'hello-world-app',
template: `
<div>Hello {{ name }}!</div>
`,
styles: [`
div {
font-weight: bold;
}
`]
})
export class HelloWorldComponent {
name: string = 'world';
}

View File

@ -0,0 +1,10 @@
<html>
<head>
<meta charset="UTF-8">
<title>Hello World</title>
<script src="built/helloworld-bundle.js"></script>
</head>
<body>
<hello-world-app></hello-world-app>
</body>
</html>