NathanWalker / angular-seed-advanced

Advanced Angular seed project with support for ngrx/store, ngrx/effects, ngx-translate, angulartics2, lodash, NativeScript (*native* mobile), Electron (Mac, Windows and Linux desktop) and more.
MIT License
2.26k stars 451 forks source link

Images folder for mobile applications #467

Closed ragul-gnts closed 6 years ago

ragul-gnts commented 6 years ago

Can you please tell me the "images" folder path for mobile application and how to load the background image from images folder in tns.scss file?

NathanWalker commented 6 years ago

You can use the ~/images/anything.png to reference an image in (for example) and images folder within the nativescript/src directory.

.coverImage {
    background-image: ~/images/anything.jpg;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

https://stackoverflow.com/questions/43333238/nativescript-how-to-set-a-background-image