Al crear no se comprueba la introducción de los datos

This commit is contained in:
nelo 2017-01-16 15:00:14 +01:00
parent 915bb464cb
commit b68760d0ae
2 changed files with 2 additions and 2 deletions

View File

@ -18,4 +18,3 @@
</vn-vertical> </vn-vertical>
</vn-card> </vn-card>
</form> </form>
<vn-confirm-client client="create.model" client-old="create.model" state="create.state"></vn-confirm-client>

View File

@ -7,11 +7,12 @@ export const COMPONENT = {
controllerAs: "create", controllerAs: "create",
controller: function($http, $state) { controller: function($http, $state) {
this.submit = function() { this.submit = function() {
this.model.active = true;
$http.post('/client/api/Clients', this.model).then( $http.post('/client/api/Clients', this.model).then(
json => $state.go('clientCard.basicData', {id: json.data.id}) json => $state.go('clientCard.basicData', {id: json.data.id})
); );
}; };
} }
}; };
COMPONENT.controller.$inject = ["$http", "$state"]; COMPONENT.controller.$inject = ['$http', '$state'];
module.component(NAME, COMPONENT); module.component(NAME, COMPONENT);