每次我打开sourcetree时都会遇到这个烦人的弹出窗口:
"SourceTree检测到以下无效的Dictionary文件引用.这些已知会导致性能问题.
你想删除这些无效的词典吗?"
如果我点击"是" - >关闭sourcetree - >重新打开它 - >再次出现弹出窗口.
有谁知道如何解决这个问题?
我使用的是1.9.10.0版
表示无法解决依赖关系的错误不够明确。目前,错误输出显示:
[ExceptionHandler] Nest can't resolve dependencies of the LeadService (LeadRepository, ?). Please make sure that the argument dependency at index [1] is available in the LeadModule context.
Run Code Online (Sandbox Code Playgroud)
从这个输出中,我可以得出结论,ConsentService
我的LeadService
. 请参阅LeadService
下面的构造函数。
此外,输出还提出以下建议:
潜在的解决方案:
- 如果依赖项是提供者,它是当前 LeadModule 的一部分吗?
我的回答:它是一个提供者,但它不是当前模块的一部分。它是来自 ConsentModule 的提供者。请参阅 ConsentModule 定义。
- 如果从单独的 @Module 导出依赖项,则该模块是否在 LeadModule 中导入?
@Module({
imports: [ /* the Module containing dependency */ ]
})
Run Code Online (Sandbox Code Playgroud)
我的回答:是的,它是从 ConsentModule 导出的,并在 LeadModule 中导入的,因此我不明白为什么会失败。
同意服务
@Injectable()
export class ConsentService {
constructor(@InjectRepository(Consent) private repository: Repository<Consent>) {} …
Run Code Online (Sandbox Code Playgroud) 我有这个简单的代码笔与Angular 4和arcgis地图,但我无法在IE 11中拖动.其他浏览器像往常一样工作.我无法升级或降级arcgis的JS库,因为它依赖于我们正在使用的其他小部件.
https://codepen.io/rbuenon/pen/NXNOww
<link rel="stylesheet" href="https://js.arcgis.com/3.23/esri/css/esri.css">
<script src="https://js.arcgis.com/3.23/"></script>
<script>
require(["esri/map", "dojo/domReady!"], function (Map) {
window.map = new Map("map", {
center: [-118, 34.5],
zoom: 8,
basemap: "topo"
});
});
</script>
<div id="map"></div>
<app-root></app-root>
Run Code Online (Sandbox Code Playgroud)
更新:
polyfill.ts
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';
import 'core-js/es6/reflect';
import 'core-js/es7/reflect';
import 'zone.js/dist/zone';
import 'classlist.js';
import 'web-animations-js';
import 'intl';
import 'intl/locale-data/jsonp/en';
Run Code Online (Sandbox Code Playgroud)
有谁知道我该如何解决这个问题?
我有一个以下的angular应用程序,并且我有一个angular.forEach函数,我想用continue
关键字跳过一些值,但是我不能。
<div ng-app="app">
<div ng-controller="test">
test
{{printPairs()}}
</div>
</div>
angular.module("app", [])
.controller("test", function($scope){
var array = [1,2,3,4,5,6];
$scope.printPairs = function(){
angular.forEach(array, function (elem) {
if(elem % 2 === 1){
continue;
}
//More logic below...
})
};
});
Run Code Online (Sandbox Code Playgroud)
有人知道为什么会这样吗?
我有一个组件,其中包含四个可能的样式文件,这些文件可以根据某些变量来应用。如何在渲染之前应用该组件的样式?
@Component({
selector: 'settings-editor',
templateUrl: './settings-editor.component.html',
styleUrls: [ './a.less', './b.less' , './c.less' ]
})
export class SettingsEditorComponent implements OnInit {
@Input()
public styleType: string;
ngOnInit() {
if (this.styleType === 'A') {
// Apply styles from a.less only
}
}
}
Run Code Online (Sandbox Code Playgroud) 在我的AWS机器上,我创建了一个Angular 2 Web应用程序@angular/cli
.我已经尝试用yarn
/ 安装所有软件包npm
但它似乎并没有安装所有软件包,因为当我进入网站时它不会注入任何提供程序而且它无法正常呈现.
我已经删除的整个文件夹node_modules/
.npm/cache
yarn/cache
与重新安装的一切yarn
和npm
,但它也不管用.
我的package.json:
{
"name": "seon.site-builder.ui",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/common": "^2.4.0",
"@angular/compiler": "^2.4.0",
"@angular/core": "^2.4.0",
"@angular/forms": "^2.4.0",
"@angular/http": "^2.4.0",
"@angular/platform-browser": "^2.4.0",
"@angular/platform-browser-dynamic": "^2.4.0",
"@angular/router": "^3.4.0",
"@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.24",
"@ngx-translate/core": "^6.0.0",
"@ngx-translate/http-loader": "^0.0.3",
"angular2-esri-loader": "^0.1.11",
"angular2-esri4-components": "^0.5.0",
"bootstrap": "4.0.0-alpha.6", …
Run Code Online (Sandbox Code Playgroud) 我的网站上的所有下拉菜单都发生了一些奇怪的事情,当除输入之外的所有输入均发生验证错误时h:selectOneMenu
,此css类将返回“ ui-state-error”。我需要设置此CSS类,以便在无效时可以用红色边框显示下拉列表。这是下拉列表:
<div class="col-md-3 col-sm-3 col-xs-6">
<div class="dd-arrow">
<h:selectOneMenu id="ccExpMonth" styleClass="form-control" value="#{paymentMethodsBean.ccExpMonth}" label="#{lang['paymentmethods.expmonth']}">
<f:selectItem itemLabel="" itemValue="#{null}" noSelectionOption="true" />
<f:selectItems value="#{dropDownListBean.ccExpMonths}" var="ccExpMonth" itemLabel="#{ccExpMonth.desc}" itemValue="#{ccExpMonth.code}" />
</h:selectOneMenu>
</div>
<p:message id="ccExpMonthMessage" for="ccExpMonth" styleClass="col-md-7 col-sm-6 col-xs-6" />
</div>
Run Code Online (Sandbox Code Playgroud)
支持豆:
@ManagedBean
@ViewScoped
@Data
@EqualsAndHashCode(callSuper = false)
public class PaymentMethodsBean extends BaseBean implements Serializable {
@Size(max = 2)
@NotBlank
private String ccExpMonth;
...
}
Run Code Online (Sandbox Code Playgroud) 我有问题将SQL转换为LINQ.问题是左连接的条件.我无法适应LINQ.
我试过这个.但这不正确.我需要!你.在左连接上不活跃.
from p in db.Persons
join u in db.Users on p.Id equals u.Pid into x
from u in x.DefaultIfEmpty()
where p.Cid == cid && !p.Deleted && !u.Inactive
orderby p.Name ascending
Run Code Online (Sandbox Code Playgroud)
SQL:
SELECT P.ID, P.Name P.EmpNo, U.ID, U.Class, P.Phone, P.Email
FROM Persons AS P
LEFT JOIN Users AS U ON P.ID = U.PID AND U.Inactive <> 1
WHERE P.CID = 1234 AND P.Deleted <> 1
ORDER BY P.Name
Run Code Online (Sandbox Code Playgroud)