我有一个索引,包含大量纸张,同一个字段的值相同.我在这个领域有一个重复数据删除.
聚合器将作为柜台来找我.我想要一份文件清单.
我的索引:
我想要这个结果(域名重复数据删除结果):
我设置了一个开发环境,将Windows 8和Ubuntu作为虚拟机.为此,我使用VirtualBox.
我还设法在VirtualBox中创建一个共享文件夹.
在这个共享文件夹中,我尝试使用Yeoman的ember-generator启动一个项目.
yo ember --skip-install --karma
npm install --no-bin-links
Run Code Online (Sandbox Code Playgroud)
对于安装模块NPM,我使用选项"--no-bin-links"不创建符号链接.不幸的是,我仍然有错误创作符号链接...我使用虽然这个选项?他有错误吗?
我使用这个指令。但是,在 setAddress 事件输出中,我的组件中未检测到任何更改。视图未更新。我不明白。
为了测试,如果我删除 google.maps.event.addListener 以替换为一个简单的 setTimeout 来调用 invokeEvent。有用。
@Directive({
selector: '[googleplace]',
providers: [NgModel],
host: {
'(input)' : 'onInputChange()'
}
})
export class GoogleplaceDirective {
@Output() setAddress: EventEmitter<any> = new EventEmitter();
modelValue:any;
autocomplete:any;
private _el:HTMLElement;
constructor(el: ElementRef,private model:NgModel) {
this._el = el.nativeElement;
this.modelValue = this.model;
var input = this._el;
this.autocomplete = new google.maps.places.Autocomplete(input, {});
google.maps.event.addListener(this.autocomplete, 'place_changed', ()=> {
var place = this.autocomplete.getPlace();
this.invokeEvent(place);
});
}
invokeEvent(place:Object) {
this.setAddress.emit(place);
}
onInputChange() {
}
}
Run Code Online (Sandbox Code Playgroud)
在我的组件视图中
<input type="text" class="validation-address-input" style="margin-top: 100px;" [value]="form.customerAddress" …Run Code Online (Sandbox Code Playgroud) 我在我的收藏中有这些文件:
{_id: "aaaaaaaa", email: "mail1@orange.fr"},
{_id: "bbbbbbbb", email: "mail2@orange.fr"},
{_id: "cccccccc", email: "mail3@orange.fr"},
{_id: "dddddddd", email: "mail4@gmail.com"},
{_id: "eeeeeeee", email: "mail5@gmail.com"},
{_id: "ffffffff", email: "mail6@yahoo.com"}
Run Code Online (Sandbox Code Playgroud)
我希望这个结果:
{
result: [
{domain: "orange.fr", count: 3},
{domain: "gmail.com", count: 2},
{domain: "yahoo.com", count: 1},
]
}
Run Code Online (Sandbox Code Playgroud)
我不确定你可以使用聚合器和$ regex运算符
如果我的应用程序关闭,点击通知栏后,回调无法正常工作.
前景很好,但背景不好.
我用这个例子:https://ionicframework.com/docs/native/fcm/
我在Andoird上测试
谢谢
android firebase ionic-framework firebase-cloud-messaging angular