I have not foiund another question that has been answered already. I have looked at the description page of this already and followed the directives there.
So in my Scss folder where I actually define custom bootstrap I created a new tag-input theme and imported its core style in it
@import "../../../../node_modules/ng2-tag-input/dist/modules/core/styles/core/_core.scss";
I also add my theme name in the component like this.
@Component({
selector: 'tags',
moduleId: module.id,
template: `
<tag-input [(ngModel)]="tags"
(onSelect)="onSelectedTag($event)"
[theme]="'ark-tag-theme'"
[placeholder]="placeHolderKey | translate"
[secondaryPlaceholder]="placeHolderKey | translate"
[inputClass]="'input-of-tag-area-class'"
(onAdd)="onTagAdded($event)"
[addOnBlur]='true'
[editable]='true'
(onRemove)="onTagRemoved($event)"
(onTagEdited)="onTagEdited($event)"
[focusFirstElement]="true"
[trimTags]="true"
[errorMessages]="errorMessages"
[validators]="validators"
[separatorKeyCodes]="[32,188]"
[ngModelOptions]="{ standalone: false }" #input>
</tag-input>
`
})
This is my scss file altogether
@import "../../../../node_modules/ng2-tag-input/dist/modules/core/styles/core/_core.scss";
$ark-theme:(
background-color: theme-color("secondary")
);
$ark-tag-theme: (
background: theme-color("secondary"),
background-focused: theme-color("secondary"),
background-active: theme-color("secondary"),
background-hover: theme-color("secondary"),
color: #fff,
color-hover: #fff,
border-radius: 2px
);
::ng-deep .ng2-tag-input.ark-tag-theme{
@include tag-theme($ark-theme);
}
::ng-deep .ng2-tag-input.ark-tag-theme tag{
@include tag-theme($ark-tag-theme);
}
Here is also my custom bootstrap set up
@import '../../../../node_modules/angular2-toaster/toaster';
// Core variables and mixins
@import "../../../../node_modules/bootstrap/scss/functions";
@import "variables-ark";
@import "../../../../node_modules/bootstrap/scss/bootstrap";
// Reset and dependencies
@import "glyphicons";
@import "ark-tag-theme";
@import "app";
@import "theme";
Ok I get the new ark-tag-theme class at the initial div of the component but everything else still reads the setup bootstrap3 and none of my classes are read for tags. I also used /deep/ instead of ng-deep but same result. Since input component is in node_modules I am sure I should not do anything there anyway because it is always overwritten.
WI tried in firefox also as I heard things about chrome not respecting ng-deep. SO how can I get my classes read for input tags?