刚刚将我的应用从5.2升级到角度6,并且angular_material_schematics
项目文件夹中出现了一个目录.不知道它的目的是什么,我应该保留它或在回购中跟踪它...
我在 PrimeNg 中遇到动态对话框问题。
除此之外,还有其他选项可以处理对话框上的其他操作吗close
?
例如,在Kendo-UI
对话框示例中,我可以定义组件的 content.instance,并且可以访问作为对话框打开的组件实例的字段。
const ref = this.dialogService.open(ResourceComponent, {
data: {
logicFormGroup: this.formGroup,
resources: this.resources$
}, width: '700px'
});
ref.onClose.subscribe((back: ResourceModel) => {
console.log(back);
});
ref.addPersonEmitter.sub(....)
in component ResourceComponent
@Output() addPersonEmitter = new EventEmitter();
Run Code Online (Sandbox Code Playgroud) 我正在处理按类别搜索类别,我想排除最后包含短划线和数字的结果(如:powerbank-1).我的查询:
$categories = Category::where('active_products', ">", 0)
->where('slug', 'LIKE', "%$search_term%")
->where('slug', 'not regexp', "/$search_term-[0-9]/")
->get();
Run Code Online (Sandbox Code Playgroud)
我的结果仍然包含不需要的结果,其中-1和-2结尾为slug:
{
"query": "powerbank",
"categories": [
{
"id": 18,
"parent_id": 17,
"lft": 108,
"rgt": 109,
"depth": 1,
"name": "Powerbank",
"description": null,
"description2": null,
"products": 43,
"active_products": 38,
"created_at": "2016-08-25 20:51:42",
"updated_at": "2016-09-20 06:06:06",
"slug": "powerbank"
},
{
"id": 20,
"parent_id": 19,
"lft": 124,
"rgt": 125,
"depth": 1,
"name": "Powerbank",
"description": null,
"description2": null,
"products": 43,
"active_products": 38,
"created_at": "2016-08-25 20:51:43",
"updated_at": "2016-09-20 06:06:06",
"slug": "powerbank-1"
}, …
Run Code Online (Sandbox Code Playgroud) angular ×1
angular6 ×1
eloquent ×1
kendo-ui ×1
laravel-5.2 ×1
mysql ×1
php ×1
primeng ×1
regex ×1
typescript ×1