I'm trying to learn Angular2, but i'm little bit confused about Component styles, in the component decorator we can specify the styles to apply them to our component, there are two ways to do this :
1- We can specify the css file in styleUrls property which is an array of strings, this is logic to me, because we might have multiple css files
@Component({
selector: 'users-list',
templateUrl: 'app/users-list.template.html',
styleUrls: ['style1.css', 'style2.css']
})
2- We can write our style in the styles property which is an array of strings too, this is where i'm getting confused!! i mean why styles property is an array of strings ? why it's not just a single string !
@Component({
selector: 'users-list',
templateUrl: 'app/users-list.template.html',
styles: [
`
.glyphicon{
cursor: pointer;
}
`
]
})
In the official documentation of Angular2 they didn't say why they put an array of strings there instead of one string ! can anyone explain me!!