Ionic function in Leaflet pin bubble

Hi Guys

I’m trying to call an Ionic/AngularJS function from within the popup pin bubble of leaflet maps.

I create a new pin like this :

	$ = {
		lng: args.leafletEvent.latlng.lng,
		message: "<button class='button button-icon icon ion-ios7-plus-outline' ng-click='test()'></button>",
		focus: true,
		draggable: true

I pretty sure that its not working because this code is injected into the HTML after Angular has processed so it has no idea that the new code is even there.

What would the best way to fix this be?