Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs无线电验证_Angularjs_Validation_Radio Button - Fatal编程技术网

Angularjs无线电验证

Angularjs无线电验证,angularjs,validation,radio-button,Angularjs,Validation,Radio Button,我正在从json文件读取数据,我需要在选择至少一个单选选项后启用submit按钮: 以下是html: [ { "a": "Transcript", "a1a": "My Studies at xyz", "a1b": "50" }, { "a": "Replacement Testamur", "a1a": "1 Bachelor of Science (Completed 2014)",

我正在从json文件读取数据,我需要在选择至少一个单选选项后启用submit按钮: 以下是html:

[
    {
        "a": "Transcript",
        "a1a": "My Studies at xyz",
        "a1b": "50"
    },
    {
        "a": "Replacement Testamur",
        "a1a": "1 Bachelor of Science (Completed 2014)",
        "a1b": "130",
        "a2a": "2 Bachelor Of Engineering (Completed 2014)",
        "a2b": "130",
        "a3a": "3 Bachelor of Science (Completed 2014)",
        "a3b": "130",
        "a4a": "4 Bachelor Of Engineering (Completed 2014)",
        "a4b": "130",
        "a5a": "5 Bachelor of Science (Completed 2014)",
        "a5b": "130",
        "a6a": "6 Bachelor Of Engineering (Completed 2014)",
        "a6b": "130",
        "a7a": "7 Bachelor of Science (Completed 2014)",
        "a7b": "130",
        "a8a": "8 Bachelor Of Engineering (Completed 2014)",
        "a8b": "130",
        "a9a": "9 Bachelor of Science (Completed 2014)",
        "a9b": "130",
        "a10a": "10 Bachelor Of Engineering (Completed 2014)",
        "a10b": "130"
    },
    {
        "a": "Australian Higher Education Graduate Statement",
        "a1a": "Bachelor of Science/Bachelor of Engineering (Completed 2014)",
        "a1b": "50"
    },
    {
        "a": "Statement of Attainment",
        "a1a": "Statements of Attainment are issued for students in Vocational Education. Please see this link for more information on award documents."
    },
    {
        "a": "Statement of Academic Completion",
        "a1a": "Bachelor of Science/Bachelor of Engineering (Completed 2014)",
        "a1b": "50"
    }
]

您遇到了什么问题?我正在从json文件读取数据,我需要在选择至少一个单选选项后启用“提交”按钮您能为此创建一个plunkr吗?基本上看起来还可以
form name="chooseAwardDocForm" ng-submit="chooseAwardDocForm.$valid && chooseAwardDoc()" novalidate> 
                            <h2>Welcome Student </h2><br/>

                            <p>


                            <h3>Select the document you wish to order. Only one document may be ordered at a time.</h3>


                            <h4>{{optionGroup}} Hi</h4>
                            </p>
                        <div class="form-group">
                    /* one of the radio options need to be selected  in order to select button*/
                                <ul>

                                    <li ng-repeat="item in awardDocItemList">
                                            <h3 ng-show="item.a && item.a1a && item.a1b">{{item.a}}</h3>

                                            <div ng-show="item.a1a && item.a1b">
                                                <input
                                                        id="item.a1a && item.a1b"
                                                        type="radio"
                                                        value="item.a1a"
                                                        name="item.a1a"
                                                        ng-model="optionGroup"
                                                        ng-required="!optionGroup">
                                                <label for="item.a1a && item.a1b">{{item.a1a}} ${{item.a1b}}</label>

                                                <div ng-show="item.a2a && item.a2b">
                                                    <input
                                                            id="item.a2a && item.a2b"
                                                            type="radio"
                                                            value="item.a2a"
                                                            name="item.a2a"
                                                            ng-model="optionGroup"
                                                            ng-required="!optionGroup">
                                                    <label for="item.a2a && item.a2b">{{item.a2a}} ${{item.a2b}}</label></div>

                                                <div ng-show="item.a3a && item.a3b">
                                                    <input
                                                            id="item.a3a && item.a3b"
                                                            type="radio"
                                                            value="item.a3a"
                                                            name="item.a3a"
                                                            ng-model="optionGroup"
                                                            ng-required="!optionGroup">
                                                    <label for="item.a3a && item.a3b">{{item.a3a}} ${{item.a3b}}</label></div>




                                            </div>

                                    </li>

                                    <div><h3> Statement of Attainment</h3>

                                        <p>Statements of Attainment are issued for students in Vocational Education. Please see this <a
                                                href="http://www.google.com">link</a> for more
                                            information on award documents.</p></div>
                                </ul>

                            <br/><br/>

                                <button class="btn" ng-disabled="chooseAwardDocForm.$invalid" type="submit"> Select </button>
                            </div>
                        </form