Hai们我是角色的新手我已经完成了一个 addproject 详细信息页面。在这个页面中,我能够获得值,但是一些值,如客户状态,项目开始日期,项目结束日期没有得到。请告诉我原因是什么?
提前致谢
addproject.html
<div class="modal fade" id="addmodal" tabindex="-1" role="dialog" aria-labelledby="modal1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">Add Project Details</h4>
</div>
<form name="form" ng-submit="vm.login()" role="form">
<div class="modal-body">
<div class="form-horizontal">
<div class="form-group">
<label for="inputEmail3" class="col-sm-3 control-label">Project Name</label>
<div class="col-sm-9">
<input type="text" name="prjname" id="prjname" class="form-control" ng-model="vm.prjname" required />
<span ng-show="form.firstName.$dirty && form.firstName.$error.required" class="help-block">First name is required</span>
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-3 control-label">Client Name</label>
<div class="col-sm-9">
<div ng-controller="MyCntrl">
<select class="form-control" name="clientname" id="clientname" class="form-control" ng-model="vm.clientname" ng-change="change(myColor)">
<option value="">Select Client Name</option>
<option ng-repeat="color in colors" value="{{color.value}}" ng-selected="{{color.value == myColor}}" name="clientname" id="clientname" class="form-control" ng-model="vm.clientname">
{{color.clientname}}
</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-3 control-label">Project Status</label>
<div class="col-sm-9">
<input type="text" name="prjsta" id="prjsta" class="form-control" ng-model="vm.prjsta" required />
<span ng-show="form.username.$dirty && form.username.$error.required" class="help-block">Username is required</span>
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-3 control-label">Project Startdate</label>
<div class="col-sm-9">
<!-- <input type="text" name="prjstartdate" id="prjstartdate" class="form-control" ng-model="vm.user.prjstartdate" required />-->
<div class="container" id="sandbox-container">
<div class="input-daterange input-group" id="datepicker" name="prjstartdate" id="prjstartdate" class="form-control" ng-model="vm.prjstartdate">
<input type="text" name="prjstartdate" id="prjstartdate" class="form-control" ng-model="vm.prjstartdate" required />
</div>
</div>
<span ng-show="form.password.$dirty && form.password.$error.required" class="help-block">Password is required</span>
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-3 control-label">Project Enddate</label>
<div class="col-sm-9">
<!-- <input type="text" name="prjenddate" id="prjenddate" class="form-control" ng-model="vm.user.prjenddate" required />-->
<div class="container" id="sandbox-container">
<div class="input-daterange input-group" id="datepicker">
<input class="input-sm form-control" name="prjenddate" id="prjenddate" class="form-control" ng-model="vm.prjenddate" type="text">
</div>
</div>
<span ng-show="form.password.$dirty && form.password.$error.required" class="help-block">Password is required</span>
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-3 control-label">Project PIN Url</label>
<div class="col-sm-9">
<input type="text" name="prjurl" id="prjurl" class="form-control" ng-model="vm.prjurl" required />
<span ng-show="form.password.$dirty && form.password.$error.required" class="help-block">Password is required</span>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
提取功能是: 的 contoller.js
function MyCntrlsave($scope,$http) {
$scope.savedetails = function() {
var vm = this;
var projectname = $scope.vm.prjname;
var cilentname = $scope.vm.color;
var clientstatus = $scope.vm.prjsta
var prjstartdate = $scope.vm.datepicker
var prjenddate = $scope.vm.prjenddate
var prjurl = $scope.vm.prjurl
alert("prjstartdate" + prjstartdate)
}
}