动态下拉AngularJS + Spring MVC中的菜单生成

时间:2015-03-11 14:20:07

标签: java angularjs spring

我在angularJS中是全新的,我希望通过使用spring MVC在AngularJS中更新arrayList of vacancies来实现动态下拉菜单生成。我还想更新空缺的arrayList。 我已经从$ scope.dropdown值填充了下拉值。

要做的两件事: 首先填充Json请求中可用空缺的数据。 其次,按[+]按钮,应填充新的空缺(职业)部分,最后应在数组空缺职位列表中进行更改。

请给我一个良好的开端如何实施。

我做了类似的事情:

<div  ng-repeat="vacancy in vacancies" ng-init="vacancies=${vacancies}">
                    <div class="input-group">
                        <span class="input-group-addon">Occupations</span>
                        <select class="form-control" ng-model="vacancy.vacancyID" ng-options="aType.id as aType.name for aType in aTypes" ></select>
                        <adda></adda>
                    </div>
                    <br />
                    <div class="input-group">
                        <span class="input-group-addon">Video-Url:</span>
                        <input class="form-control" type="text" ng-model="vacancy.video" name="twitter"  />
                    </div>  
                    <br />

                </div>   

由于

Json请求:

{
  "companyID": 50,
  "companyName": "Agrident GmbH",
  "companyUnternehmensprofil": null,
  "vacancies": [
    {
      "vacancyID": 1,
      "beginn": null,
      "number": "3",
      "profile": "Profile text",
      "tasks": "Task test 1",
      "title": "Title1",
      "typeOfApplication": "Angewandte Informatik",
      "typeOfVacancy": "DualesStudium"
    },
    {
      "vacancyID": 2,
      "beginn": null,
      "number": "5",
      "profile": "Profile text",
      "tasks": "Task1",
      "title": "Title2",
      "typeOfApplication": "Elektroanlagenmonteur/-in",
      "typeOfVacancy": "Ausbildungsplatz"
    }
  ]
}

Sample UI

0 个答案:

没有答案