I have a nested component SearchBar as a child of my Header. My component definition:
@Component({
moduleId: module.id,
selector: 'search-form',
templateUrl: 'search-form.component.html',
styleUrls: [ 'search-form.component.css']
})
search-form.component.html is using the following directive inside:
<tag-input placeholder="Add tags ..."
[(model)]="tagsArray"
(tagsChanged)="onTagsChange($event)"
(tagsAdded)="onTagsAdded($event)"
(tagRemoved)="onTagRemoved($event)"
[delimiterCode]="[32]"></tag-input>
and inside search-form.component.html I have the following rule:
.ng2-tag-input-field {
padding: 5px;
border-radius: 6px;
margin-right: 10px;
direction: ltr;
text-align: right;
}
The CSS rules have no effect on the nested directive, unless I put the CSS inside Styles.css file. Why this isn't working as expected?