Angular2 and styles


#1

I just started your Angular 2 boiler plate – https://github.com/bsliran/angular2-meteor-base

Worked fine…except, it will not import the css via styleUrls. Am i missing a step in configuration?

@Component({
    selector: 'app',
    styleUrls: ['./app.component.css'],
    template
})
export class AppComponent {

#2

Tried to add the /client/main.scss…

While processing files with angular2-compilers (for target web.browser):
/client/main.scss: Scss compiler error: File to import: {}/node_modules/bootstrap/scss/bootstrap.scss not found in file: C:/Users/Greg/WebstormProjects/Saturn_V2A/{}/client/main.scss

The files are present.

I have gotten this to work this to work in earlier releases.


#3

This will work…

@import “…/…/node_modules/bootstrap/scss/bootstrap.scss”;


#4

But cannot get the @Component,

styleUrls: [’./app.component.css’],

decorator to work…as mentiones above.


#5

Okay… previously the relative path worked (e.g. ‘/.app.component.css’)…this build it does not.

When I used:

styleUrls: [’…/…/client/imports/app/app.component.scss’],

It works.


#6

We just updated the boilerplate to support style loading - https://github.com/bsliran/angular2-meteor-base/commit/4fa1a67305872b2341006fec3f3522dab11f58e2
please check it out and if it’s still not working for you open an issue on the repository.
Thanks!


#7

Great…newb questions…how do I update my project to take advantage of this?