1

Using Angular CLI, I've been working through a Udemy course on Angular 2. Unfortunately, the instructor doesn't use CLI, so I may be missing something, but my app doesn't seem to apply any CSS styling. Given that CLI automatically includes styleUrls: ['app.component.css'] in the root component as well as creates that CSS file, I wouldn't think it would be a syntax error with the routing, but I don't know for sure. Here's the link to my code: https://github.com/mrmikemcguire/Udemy-directives and thanks in advance.

1
  • Having the same issue - I just added a simple like like "body { background-color: red } and it shows nothing in the final page. Commented Sep 11, 2016 at 16:13

1 Answer 1

1

I reviewed your repo your directives shouldn't have templates if you create your views inside of your root components html then your css implementation will work.

https://angular.io/docs/ts/latest/guide/attribute-directives.html

There are no templates for directives in general.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.