I'm working angular2 project as well as I'm coding with typescript. I have a service:
@Component({
    selector: 'my-component',
    templateUrl: 'app/component.template.html'
})
export class MyComponent {
    constructor(public myServie: MyService) {
        this.myServie.get().then((data: any) => {
            // data has html content
        });
    }
}
Service result is like this:
a ='<p>
 <a class="link1" href="#p1">link 1</a>
 <a class="link2" href="#p2">link 2</a>
 <a class="link3" href="#p3">link 3</a>
</p>'
How can I search in this content, find element with class="link1" and replace its href? I don't want to use JQuery or something like that.
 
     
    