I'm trying to set a checkbox to true with Angularjs. When i save it must save an integer (1 or 0) on my field.
Here is the view:
<input type="checkbox" ng-model="lis.SMSPromotion" id="SMSPromotion" ng-init="checked=true" >
app.js
$scope.lis.SMSPromotion = true;
Model
public Nullable<int> SMSPromotion { get; set; }
i have this error Error:
[$injector:unpr] Unknown provider: SMSPromotionProvider <- SMSPromotion
Controller
var CreateCtrl = function ($scope, $location, data, $filter,SMSPromotion ) {
$scope.save = function () {
data.save($scope.lis, function () {
$location.path('/')
});
};
$scope.lis.SMSPromotion = true;
};