首页 \ 问答 \ .NET Framework 4.6.2和.NET Standard 2.0不兼容(.NET Framework 4.6.2 and .NET Standard 2.0 incompatibility)

.NET Framework 4.6.2和.NET Standard 2.0不兼容(.NET Framework 4.6.2 and .NET Standard 2.0 incompatibility)

一个项目的目标是.NET Framework 4.6.2

一个项目使用引用.NET Standard 2.0的 NuGet包Entity Framework Core(它出现在packages文件夹中)

据我所知, .NET 4.6.2.NET Standard 2.0是不兼容的。 它会导致任何问题吗?


A project targets .NET Framework 4.6.2.

A project uses NuGet package Entity Framework Core that references .NET Standard 2.0 (it appeared in packages folder)

As far as I know, .NET 4.6.2 and .NET Standard 2.0 are incompatible. Could it cause any issues?


原文:https://stackoverflow.com/questions/46581816
更新时间:2024-04-13 15:04

最满意答案

通常我会使用范围参数和ng-show / ng-if切换,不确定这是否是您想要的。

angular.module('test', [])

.controller('Test', function($scope) {
  $scope.parents = [{
    name: "parent 1",
    children: [{
      name: "p1 child 1",
      form: "p1 c1 form"
    }, {
      name: "p1 child 2",
      form: "p1 c2 form"
    }]
  }, {
    name: "parent 2",
    children: [{
      name: "p2 child 1",
      form: "p2 c1 form"
    }, {
      name: "p2 child 2",
      form: "p2 c2 form"
    }]
  }]
});
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.1/angular.min.js"></script>

<div ng-app='test' ng-controller='Test'>
  <div ng-repeat="parent in parents">
    {{parent.name}}
    <div ng-repeat="child in parent.children">
      {{child.name}}
      <button type="button" ng-click="child.isOpen = !child.isOpen">Toggle</button>
    </div>
  </div>
  
  <br><br>
  <div ng-repeat="parent in parents">
    <div ng-repeat="child in parent.children">
      <div ng-show="!!child.isOpen">{{child.form}}</div>
    </div>
  </div>
</div>


Normally I do toggle with a scope parameter and ng-show/ng-if, not sure if this is what you want.

angular.module('test', [])

.controller('Test', function($scope) {
  $scope.parents = [{
    name: "parent 1",
    children: [{
      name: "p1 child 1",
      form: "p1 c1 form"
    }, {
      name: "p1 child 2",
      form: "p1 c2 form"
    }]
  }, {
    name: "parent 2",
    children: [{
      name: "p2 child 1",
      form: "p2 c1 form"
    }, {
      name: "p2 child 2",
      form: "p2 c2 form"
    }]
  }]
});
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.1/angular.min.js"></script>

<div ng-app='test' ng-controller='Test'>
  <div ng-repeat="parent in parents">
    {{parent.name}}
    <div ng-repeat="child in parent.children">
      {{child.name}}
      <button type="button" ng-click="child.isOpen = !child.isOpen">Toggle</button>
    </div>
  </div>
  
  <br><br>
  <div ng-repeat="parent in parents">
    <div ng-repeat="child in parent.children">
      <div ng-show="!!child.isOpen">{{child.form}}</div>
    </div>
  </div>
</div>

相关问答

更多
  • 因为你在控制器方法中有一个$watch 。 因此,而不是寻找DOM节点有一个监视集合: angular.controller('LogBtnCtrl', function($scope, TodayLogBtns) { $scope.logBtns = [0,1,2,3,4]; $scope.$watch('logBtns', function() { console.log('a', $scope.logBtns.length); }); console.log ...
  • 你不能在div上使用ng-change ,它只适用于复选框,收音机,文本等输入元素。 这是要求ng-model ..即使用ng-change你将不得不强制使用ng-model 。 在你的情况下使用ng-click 。 这是ng-change的文档 。 You cant use ng-change on a div it is only applicable for input elements like checkbox, radio, text etc. It is asking for ng-model ...
  • 通常我会使用范围参数和ng-show / ng-if切换,不确定这是否是您想要的。 angular.module('test', []) .controller('Test', function($scope) { $scope.parents = [{ name: "parent 1", children: [{ name: "p1 child 1", form: "p1 c1 form" }, { name: "p1 c ...
  • 据我所知 ,css class table-row位于myTableRow指令中,该指令没有replace: true属性。 这意味着表行 css类被my-table-row指令属性包装,因此,为了到达最后一行,您的CSS规则应该是: .table my-table-row:last-child .table-row { border-radius: 0 0 4px 4px; } as I understood, css class table-row is located within myTabl ...
  • 也许这个问题在于$('.sortable').sortable()的执行时间$('.sortable').sortable() 。 在设置控制器后,Sortable会立即查找具有classname的元素。 那时ng-repeat尚未启动,因此$('.sortable')找不到元素。 在下面的js小提琴中,控制台中的输出显示了这个问题。 http://jsfiddle.net/Q5FWt/439/ 一个快速的脏修复是在setTimeout放入$('.sortable').sortable() 。 但是,操纵d ...
  • 你的指令之前有 。 您需要明确关闭该标记。 请参阅此错误报告 。 You have before your directive. You need to explicitly close that tag. See this bug report.
  • 你的意思是显示x ? n就像你看到的那样是一个数组。
    {{x}}
    Do you mean to display x? n is an array ...
  • 问题是ng-repeat动态地渲染所有div,并且你在开始时绑定jQuery事件,那时share-popup类元素没有在DOM上呈现,这就是为什么那些事件没有附加那个元素。 您需要编写自己的自定义指令,该指令将限制类和在DOM上呈现类元素时,此指令link函数将被触发并且事件将被附加。 指示 app.directive('sharePopup', function(){ return{ restrict: 'C', link: function(scope, elemen ...
  • 这里的解决方案是获取您需要的所有数据并创建一个类别数组,每个类别都包含自己的子类别。 并在嵌套的ng-repeats使用此对象。 请检查我的更新版本的plunker: https://plnkr.co/edit/BaHOcI4Qa8t5CkbshyCX 如你所见,我使用: ng-repeat="category in documents.categories" 在外部ng-repeat和: ng-repeat="service in category.subCategories" 在内在的。 在Cont ...
  • 相关文章

    更多
  • AMF: ASP.NET Mobile Framework
  • 【z】Storm - the world's best IDE framework for .NET
  • 《DotNetNuke 4 高级编程》(Professional DotNetNuke 4: Open Source Web Application Framework for ASP.NET 2.0)扫描版[PDF]
  • Windows Moible, Wince 使用.NET Compact Framework的进行蓝牙(Bluetooth)开发 之 蓝牙虚拟串口 (Bluetooth Virtual Serial Port)
  • [Yii Framework] 使用Yii Framework开发微信公众平台
  • Good .net tools
  • 【转载】Lucence.Net
  • [其它] - .NET 世界排名榜
  • 使用.net调用Solr
  • .NET相关的最好东西--全球最新评价
  • 最新问答

    更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)