Skip to content

next tag: when using platformNativeScriptDynamic AppOptions custom css, 'application.setCssFileName' is undefined #586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
NathanWalker opened this issue Dec 11, 2016 · 2 comments

Comments

@NathanWalker
Copy link
Contributor

file:///app/tns_modules/nativescript-angular/bundle.all.js:1022:39: JS ERROR TypeError: application.setCssFileName is not a function. (In 'application.setCssFileName(this.appOptions.cssFile)', 'application.setCssFileName' is undefined)

When doing the following:

import { platformNativeScriptDynamic } from 'nativescript-angular';

import { AppModule } from './app.module';

const platform = platformNativeScriptDynamic({cssFile: 'custom-named.css'});
platform.bootstrapModule(AppModule);

tns: 2.4.1
nativescript-angular: next

@nsndeck
Copy link
Contributor

nsndeck commented Dec 12, 2016

Hi @NathanWalker,
Generally nativescript-angular@next depends on tns-core-modules@next. Unfortunately applications uses tns-core-modules from its dependency and problem arises, However since the change of tns-core-modules is very small we will release new version by the end of the week. Meanwhile update app's package.json with next as version to tns-core-modules.

@RoyiNamir
Copy link

RoyiNamir commented Jun 27, 2018

@NathanWalker @nsndeck

Hi. Does it work for you with --bundle ?
I've reported it here :
NativeScript/nativescript-dev-webpack#587

Custom cssFile is respected only without --bundle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants