Javascript 引导输入组和AngularJS动态内容
在以下示例中:Javascript 引导输入组和AngularJS动态内容,javascript,html,css,angularjs,twitter-bootstrap,Javascript,Html,Css,Angularjs,Twitter Bootstrap,在以下示例中: (函数(角度){ 变量模块=角度模块('测试',[]); module.controller('TestCtrl',['$scope',function($scope){ $scope.before=$scope.after=true; $scope.profile=[ {key:'Prop1',type:'text',value:'test'}, {key:'Prop2',type:'number',value:42}, {key:'Prop3',type:'complex'
(函数(角度){
变量模块=角度模块('测试',[]);
module.controller('TestCtrl',['$scope',function($scope){
$scope.before=$scope.after=true;
$scope.profile=[
{key:'Prop1',type:'text',value:'test'},
{key:'Prop2',type:'number',value:42},
{key:'Prop3',type:'complex',value:15,extra:1},
];
}]);
})(角度);
angular.element(文档).ready(函数(){
引导(文档,['test']);
});代码>
显示“之前”
显示“之后”
{{prop.key}}
之前
一
二
之后
我对此困惑了好几天,但在一个神秘的案例中,“把问题写下来就能找到答案”,我想我终于找到了答案
添加以下CSS似乎可以做到这一点:
.input-group span:not(:first-child) .form-control:first-child {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.input-group span:not(:last-child) .form-control:last-child {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
(函数(角度){
变量模块=角度模块('测试',[]);
module.controller('TestCtrl',['$scope',function($scope){
$scope.before=$scope.after=true;
$scope.profile=[
{key:'Prop1',type:'text',value:'test'},
{key:'Prop2',type:'number',value:42},
{key:'Prop3',type:'complex',value:15,extra:1},
];
}]);
})(角度);
angular.element(文档).ready(函数(){
引导(文档,['test']);
});代码>
。输入组span:not(:first child)。表单控件:first child{
边框左上半径:0;
边框左下半径:0;
}
.输入组范围:非(:最后一个子项)。窗体控件:最后一个子项{
边框右上角半径:0;
边框右下半径:0;
}
显示“之前”
显示“之后”
{{prop.key}}
之前
一
二
之后