Skip to content

Commit 4e51058

Browse files
committed
Add inline styles
1 parent 661271a commit 4e51058

5 files changed

Lines changed: 12 additions & 9 deletions

File tree

src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { AspectRatioMode } from '@nodegui/nodegui';
99
#app {
1010
background-color: gray;
1111
}
12-
#image {
12+
#button {
1313
}
1414
`
1515
],

src/lib/file-system-resource-loader.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import * as path from 'path';
22
import * as fs from 'fs';
33
import { ResourceLoader } from '@angular/compiler';
44

5+
// Do not use
56
export class FileSystemResourceLoader extends ResourceLoader {
67
resolve(url: string, baseUrl: string): string {
78
// Angular assembles absolute URL's and prefixes them with //
@@ -13,8 +14,9 @@ export class FileSystemResourceLoader extends ResourceLoader {
1314
}
1415
}
1516

16-
get(url: string): Promise<string> {
17+
get(url: string, aa?: any): Promise<string> {
1718
// TODO: Load real app dir
19+
1820
const appDir = path.join(__dirname, '../../../src/app');
1921
const templatePath = this.resolve(url, appDir);
2022

src/lib/platform-dynamic.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ export const platformNodeguiDynamic = createPlatformFactory(
2525
provide: ElementSchemaRegistry,
2626
useClass: NodeguiElementSchemaRegistry,
2727
deps: []
28-
},
29-
{
30-
provide: ResourceLoader,
31-
useClass: FileSystemResourceLoader,
32-
deps: []
3328
}
29+
// {
30+
// provide: ResourceLoader,
31+
// useClass: FileSystemResourceLoader,
32+
// deps: []
33+
// }
3434
]
3535
},
3636
multi: true

src/lib/renderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class NodeguiRenderer implements Renderer2 {
5252
if (Component) {
5353
return new Component();
5454
} else {
55-
// TODO create widget with name, may be customm component
55+
// TODO create widget with name, may be custom component
5656
console.warn(`${name} component is not find in components map`);
5757
}
5858
}

tsconfig.app.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
"angularCompilerOptions": {
1212
"skipMetadataEmit": false,
13-
"skipTemplateCodegen": true
13+
"skipTemplateCodegen": true,
14+
"enableResourceInlining": true
1415
}
1516
}

0 commit comments

Comments
 (0)