I have an HTML page with a button which fires on click a request to an external service. This post request returns an HTML page.
Is it possible to replace the current ngView with this HTML content?
$scope.clickEvent = function() {
var url = '/external-service';
var param = { someParameter: someValue };
$http
.post(url, param)
.then(function (data) { // sucess
// replace ngView with the data contents (which is a HTML)
}, function (data) {
// error
});
}