Angularjs 没有任何影响
我有一个尝试使用ng show的基本示例。如果从国家/地区下拉框中选择了“GB”,我实际上只想显示页面的一部分。我已经验证了当我从下拉框中选择GB时,ctrl在其中接收“GB”。但是,元素最初不会隐藏在页面上,从选择框中选择内容不会产生任何影响。我非常感谢你的帮助Angularjs 没有任何影响,angularjs,ng-show,angular1.6,Angularjs,Ng Show,Angular1.6,我有一个尝试使用ng show的基本示例。如果从国家/地区下拉框中选择了“GB”,我实际上只想显示页面的一部分。我已经验证了当我从下拉框中选择GB时,ctrl在其中接收“GB”。但是,元素最初不会隐藏在页面上,从选择框中选择内容不会产生任何影响。我非常感谢你的帮助 <ng-form name="directorsForm" cc-pitch-form="5" ng-controller="work.myCtrl as ctrl"> <div class="row cc-
<ng-form name="directorsForm" cc-pitch-form="5" ng-controller="work.myCtrl as ctrl">
<div class="row cc-form__group">
<div class="columns large-3">
<label>Country</label>
</div>
<div class="columns large-3 left">
<select ng-options="country.code as country.name for country in ctrl.countryList" ng-model="ctrl.selectedCountry" />
</div>
</div>
<div ng-show="ctrl.selectedCountry =='GB'">
<div class="columns large-3">
<label>Enter address</label>
</div>
</div>
</ng-form>
国家
输入地址
更换该行
<select ng-options="country.code as country.name for country in ctrl.countryList" ng-model="ctrl.selectedCountry" />
像这样
<select ng-options="country.code as country.name for country in ctrl.countryList" ng-model="ctrl.selectedCountry" ></select>
选择中的自动关闭在角度中不起作用,我希望它有帮助 更换此线路
<select ng-options="country.code as country.name for country in ctrl.countryList" ng-model="ctrl.selectedCountry" />
像这样
<select ng-options="country.code as country.name for country in ctrl.countryList" ng-model="ctrl.selectedCountry" ></select>
选择中的自动关闭在角度中不起作用,我希望它有帮助 显示您的控制器您的ng显示看起来不错,错误可能在您的控制器或ng选项中。我的控制器中没有任何与此相关的逻辑。@MattBoyle当然,它看起来像angular无法与关闭自身的错误
select
一起工作。看见您必须将
更改为
显示您的控制器您的ng显示看起来很好,错误可能在您的控制器或ng选项中。我的控制器中没有任何与此相关的逻辑。@MattBoyle当然看起来angular无法使用关闭自身的错误选择。看见您必须将
更改为