I'm new to Angular. I'm working on a project. I have created a custom month-picker
component in Angular 6
from the scratch (*because I'm not allowed to outsource any 3rd party library not even bootstrap
, fontawesome
or primeng
) and for that I want a simple text field inside which I want to show a simple calendar icon. I tried few solutions. This is most relevant but they are using AngularJS
. This is also somewhat different. This is also not very useful. Here is my code. I also created a CodePen.
timeselector.component.html
<our-icon class="icon-our-calendar"></our-icon>
<input class="input-field" type="text">
Note: <our-icon>
is my organisation's own library of icons. I'm not allowed to go beyond that.
I was trying this on CodePen but using some hex code for the icon. Is there anyway I can add our-icon
tag as a placeholder to the input field like this:
<input class="input-field" type="text" placeholder="<our-icon class="icon-our-calendar"></our-icon>">
I know this is completely wrong but just wanted to give you an idea what I actually mean.
But first I want to ask is it even doable or I'm simply wasting everyone's time. Please give me some direction.