Skip to content

Instantly share code, notes, and snippets.

View mvar's full-sized avatar

Mantas Var mvar

  • Kaunas, Lithuania
View GitHub Profile
@mvar
mvar / formController.js
Created February 26, 2016 11:47 — forked from romaricdrigon/formController.js
Using AngularJS on Symfony2 forms
// An example controller binded to the form
function FormCntl($scope, $compile) {
// Consider using FosJsRouting bundle, if you want to use a Symfony2 route
$scope.formUrl = "http://url-to-fetch-my-form";
// Data from the form will be binded here
$scope.data = {};
// Method called when submitting the form
$scope.submit = function() {