File tree Expand file tree Collapse file tree 4 files changed +36
-30
lines changed
Expand file tree Collapse file tree 4 files changed +36
-30
lines changed Original file line number Diff line number Diff line change 1- import { Component } from ' @angular/core' ;
1+ import { Component } from " @angular/core" ;
22
33@Component ( {
4- selector : ' my-app' ,
5- templateUrl : ' ./app.component.html' ,
6- styleUrls : [ ' ./app.component.css' ]
4+ selector : " my-app" ,
5+ templateUrl : " ./app.component.html" ,
6+ styleUrls : [ " ./app.component.css" ] ,
77} )
88export class AppComponent {
9- versionDeno = Deno . version . deno ;
9+ versionDeno = Deno . version . deno ;
1010}
Original file line number Diff line number Diff line change 1-
2- import { NgModule } from '@angular/core' ;
3- import { ServerModule } from '../mod.ts' ;
4- import { AppComponent } from './app.component.ts' ;
5-
1+ import { NgModule } from "@angular/core" ;
2+ import { ServerModule } from "../mod.ts" ;
3+ import { AppComponent } from "./app.component.ts" ;
64
75@NgModule ( {
8- imports : [ ServerModule ] ,
9- declarations : [ AppComponent ] ,
10- bootstrap : [ AppComponent ] ,
11- providers : [ ]
6+ imports : [ ServerModule ] ,
7+ declarations : [ AppComponent ] ,
8+ bootstrap : [ AppComponent ] ,
9+ providers : [ ] ,
1210} )
13- export class AppModule { }
11+ export class AppModule { }
Original file line number Diff line number Diff line change 1- import { CompilerFactory , enableProdMode } from ' @angular/core' ;
2- import { bootstrap , CommonEngine } from ' ../mod.ts' ;
3- import { AppModule } from ' ./app.module.ts' ;
1+ import { CompilerFactory , enableProdMode } from " @angular/core" ;
2+ import { bootstrap , CommonEngine } from " ../mod.ts" ;
3+ import { AppModule } from " ./app.module.ts" ;
44
55import "../reflect.ts" ;
6- import ' zone.js' ;
6+ import " zone.js" ;
77
88const { readFile } = Deno ;
99const decoder = new TextDecoder ( ) ;
1010
11- const indexHtml = decoder . decode ( await readFile ( ' index.html' ) ) ;
11+ const indexHtml = decoder . decode ( await readFile ( " index.html" ) ) ;
1212
1313enableProdMode ( ) ;
1414
1515const ref : any = await bootstrap ( AppModule , indexHtml ) ;
1616
17- export const engine = new CommonEngine ( ref . injector . get ( CompilerFactory ) , AppModule ) ;
17+ export const engine = new CommonEngine (
18+ ref . injector . get ( CompilerFactory ) ,
19+ AppModule ,
20+ ) ;
1821
1922// Render page
2023
21- console . log ( await engine . render ( { document : indexHtml , url : "/" } ) ) ;
24+ console . log ( await engine . render ( { document : indexHtml , url : "/" } ) ) ;
Original file line number Diff line number Diff line change 11import { serve } from "https://deno.land/std@0.59.0/http/server.ts" ;
22
3- import { CompilerFactory , enableProdMode } from ' @angular/core' ;
4- import { bootstrap , CommonEngine } from ' ../mod.ts' ;
5- import { AppModule } from ' ./app.module.ts' ;
3+ import { CompilerFactory , enableProdMode } from " @angular/core" ;
4+ import { bootstrap , CommonEngine } from " ../mod.ts" ;
5+ import { AppModule } from " ./app.module.ts" ;
66
77import "../reflect.ts" ;
8- import ' zone.js' ;
8+ import " zone.js" ;
99
1010const { readFile } = Deno ;
1111const decoder = new TextDecoder ( ) ;
1212
13- const indexHtml = decoder . decode ( await readFile ( ' index.html' ) ) ;
13+ const indexHtml = decoder . decode ( await readFile ( " index.html" ) ) ;
1414
1515enableProdMode ( ) ;
1616
1717const ref : any = await bootstrap ( AppModule , indexHtml ) ;
1818
19- export const engine = new CommonEngine ( ref . injector . get ( CompilerFactory ) , AppModule ) ;
19+ export const engine = new CommonEngine (
20+ ref . injector . get ( CompilerFactory ) ,
21+ AppModule ,
22+ ) ;
2023
2124const s = serve ( { port : 8000 } ) ;
2225
2326for await ( const req of s ) {
24- const body : string = await engine . render ( { document : indexHtml , url : req . url } ) ;
27+ const body : string = await engine . render (
28+ { document : indexHtml , url : req . url } ,
29+ ) ;
2530 req . respond ( { body } ) ;
26- }
31+ }
You can’t perform that action at this time.
0 commit comments