function campform() {
$.ajax({url: "{{ path('campform') }}", success: function(result){
$("#respuesta").html(result);
}});
}
Result has angular code, and it doesn't work, I don't know how do I have to compile result.
function campform() {
$.ajax({url: "{{ path('campform') }}", success: function(result){
$("#respuesta").html(result);
}});
}
Result has angular code, and it doesn't work, I don't know how do I have to compile result.
Hey this is not angular way :-)
You should use $http
service for such calls
$http.get('/someUrl').
success(function(data, status, headers, config) {
$("#respuesta").html(result);
}).
error(function(data, status, headers, config) {
// called asynchronously if an error occurs
// or server returns response with an error status.
});