Custom css location in nativescript 3 angular project


#1

Brand new NativeScript developer here,

I ran into an issue where i would like my css not to be in the root of the project but i cannot find where app.css is defined as the default css file or its location. The documentation didn’t deliver. It states:

import { setCssFileName, start as applicationStart } from "application";
setCssFileName("style.css");

applicationStart({ moduleName: "main-page" });

I figured i could put a directory in the place of style.css but i dont even have a file containing applicationStart so i don’t know where to put this.

Maybe i am missing something but i can’t seem to figure this one out on my own.

Thanks in advance,
Robin

Update:

I was looking in the wrong docs. For angular apps it can be set with

platformNativeScriptDynamic({bootInExistingPage:false, cssFile:"app.css"});

However i havent been able to get this to work with file nested in some directories


Final:

In the end i just used it wrong. In the main.ts there is an
platformNativeScriptDynamic().bootstrapModule(AppModule); already.
this just needs to be expanded with the object {bootInExistingPage:false, cssFile:"app.css"}

as so

platformNativeScriptDynamic({bootInExistingPage:false, cssFile:"/application/style/app.css"}).bootstrapModule(AppModule);


#2

are you all set here? Can you mark ‘complete’?


#3

I can’t find an option ‘complete’ ? and i can’t select my own answer as solved this issue (or something similair)