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:
20
integration/platform-server/src/helloworld/app.server.ts
Normal file
20
integration/platform-server/src/helloworld/app.server.ts
Normal 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 {
|
||||
}
|
20
integration/platform-server/src/helloworld/app.ts
Normal file
20
integration/platform-server/src/helloworld/app.ts
Normal 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 {
|
||||
}
|
17
integration/platform-server/src/helloworld/client.ts
Normal file
17
integration/platform-server/src/helloworld/client.ts
Normal 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);
|
||||
};
|
@ -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';
|
||||
}
|
10
integration/platform-server/src/helloworld/index.html
Normal file
10
integration/platform-server/src/helloworld/index.html
Normal 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>
|
Reference in New Issue
Block a user