Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit f1cad69

Browse files
committed
refactor(load-app-css): use registerModule instead of require.context
1 parent fd069c9 commit f1cad69

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

demo/AngularApp/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
}
1414
},
1515
"dependencies": {
16-
"@angular/common": "~6.0.0-rc.0",
17-
"@angular/compiler": "~6.0.0-rc.0",
18-
"@angular/core": "~6.0.0-rc.0",
19-
"@angular/forms": "~6.0.0-rc.0",
20-
"@angular/http": "~6.0.0-rc.0",
21-
"@angular/platform-browser": "~6.0.0-rc.0",
22-
"@angular/platform-browser-dynamic": "~6.0.0-rc.0",
23-
"@angular/router": "~6.0.0-rc.0",
24-
"nativescript-angular": "rc",
16+
"@angular/common": "~6.0.0",
17+
"@angular/compiler": "~6.0.0",
18+
"@angular/core": "~6.0.0",
19+
"@angular/forms": "~6.0.0",
20+
"@angular/http": "~6.0.0",
21+
"@angular/platform-browser": "~6.0.0",
22+
"@angular/platform-browser-dynamic": "~6.0.0",
23+
"@angular/router": "~6.0.0",
24+
"nativescript-angular": "~6.0.0",
2525
"nativescript-theme-core": "~1.0.2",
2626
"reflect-metadata": "~0.1.8",
2727
"rxjs": "~6.0.0-beta.1",
@@ -30,7 +30,7 @@
3030
},
3131
"devDependencies": {
3232
"@angular-devkit/core": "~0.7.0-beta.1",
33-
"@angular/compiler-cli": "~6.0.0-rc.0",
33+
"@angular/compiler-cli": "~6.0.0",
3434
"@ngtools/webpack": "~6.1.0-beta.1",
3535
"@types/chai": "^4.0.2",
3636
"@types/mocha": "^2.2.41",

load-application-css.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
const application = require("application");
2-
require("ui/styling/style-scope");
1+
const application = require("tns-core-modules/application");
2+
require("tns-core-modules/ui/styling/style-scope");
3+
4+
global.registerModule("./app.css", () => require("~/app"));
35
const appCssContext = require.context("~/", false, /^\.\/app\.(css|scss|less|sass)$/);
46
global.registerWebpackModules(appCssContext);
7+
58
application.loadAppCss();
69

0 commit comments

Comments
 (0)