Reputation: 339
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.
Upvotes: 1
Views: 667
Reputation: 15361
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.
Upvotes: 1