Split a string in AngularJs 2
<p>I have an object profileObj.details[0].time which is equal to "10AM-4PM"
I want to split this string into <strong>10AM</strong> and <strong>4PM</strong> .</p>

<p>please help to solve this issue.
Thanks in advance</p>