我尝试在Ionic/cordova应用程序中连接Facbook帐户工具包,我面临的主要问题是在facebook帐户工具包中设置客户端/服务器端域名,但在ionic/cordova app中,webview服务来自文件系统("file:/// android_asset/WWW/index.html的#/应用/请求").那么如何在Ionic应用程序中执行此操作.
我想做一些单元测试,有一个formGroup从父组件到子组件的输入传递,如何做。
应用程序组件.ts
import { Component, Input } from '@angular/core';
import { FormGroup, FormControl } from '@angular/forms';
import { TranslateHelper } from '@app/core/translation';
@Component({
selector: 'basic-info',
templateUrl: './'basic.component.html',
styleUrls: ['./basic.component.scss']
})
export class BasicInfoComponent {
@Input() form: FormGroup;
constructor(private translation: TranslateHelper) {
}
get w(): FormControl {
return this.form.get('y') as FormControl;
}
get x(): FormControl {
return this.form.get('x') as FormControl;
}
get y(): FormControl {
return this.form.get('y') as FormControl;
}
get z(): FormControl {
return this.form.get('z') as FormControl;
} …Run Code Online (Sandbox Code Playgroud) 我有一个数学方程
var equation="(4+5.5)*3+4.5+4.2";
Run Code Online (Sandbox Code Playgroud)
当我做
equation.split('').join(' ');
Run Code Online (Sandbox Code Playgroud)
它得到输出,每个字符之间有空格。
( 4 + 5 . 5 ) * 3 + 4 . 5 + 4 . 2
Run Code Online (Sandbox Code Playgroud)
如何在数字和字母字符之间插入空格?
样本输出:
( 4 + 5.5 ) * 3 + 4.5 + 4.2
Run Code Online (Sandbox Code Playgroud)
有任何人可以帮助我如何弄清楚,谢谢。