Last active
March 29, 2016 19:21
-
-
Save washingtonsoares/fd37e55e5a1a8dfa6141a250bae8d7e8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$scope.newSession = function(session){ | |
MeuServico.newSession(session).success(function(){ | |
//sucesso | |
}).error(function(){ | |
//erro | |
}) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var newSession = function(session) { | |
return $http.post("minhaApi.com/criar", session); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form ng-submit="newSession(session)"> | |
<input type="text" ng-model="session.abc" name="session.abc" /> | |
<input type="text" ng-model="session.xyz" name="session.xyz" /> | |
<input type="submit" id="submit" value="Submit" /> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment