ウェブサイト検索
私は関数(getLocalSecurity)を持っており、これはコマンドプロンプトから引数を取得してブール値を返します。こちらをご覧ください:
server.ts: import { getDataService } from './service'; import { getInternalService } from './internal/service'; import { ServiceFactory } from './services/serviceFactory'; import { loggers } 続きを読む →
msg.trim は関数ではありません。
その後、Android用の.apkファイルを生成しようとしたところ、このエラーが発生しました。npmとionicの両方をアンインストールして再インストールしましたが、同じエラーが発生しています。誰かこの問題を解決する手助けをしてもらえませんか。
C:\>ionic -v 3.16.0 TypeError: msg.trim is not a function at Logger.log (C:\Users\DELL INDIA\AppData\Roaming\npm\node_modules\ionic\node_modules\@ionic\cli-utils\lib\utils\logger.js:78:21) at 続きを読む →
私はこのコードを持っています
export function LocalStorage(key?: string) { return WebStorage(localStorage, key); } export function WebStorage(webStorage: Storage, key: string) { return (target: Object, propertyName: string): void => { 続きを読む →
私は .next() を使って period と呼ばれる Subject に新しい文字列をプッシュしようとしていますが、コンソールには this.period.next は関数ではありません というエラーが表示されます。
option.component.ts
import { Component, OnInit } from '@angular/core'; import { Subject } from 'rxjs'; @Component({ selector: 'app-option', template 続きを読む →もし私が持っているなら
public model; public control = new FormControl(''); control.valueChanges.debounceTime(300).subscribe((value) => { this.model = value; }); myFunc() { console.log(this.model); }次に:
<input [formControl]="control" (keydown.enter)="myFunc()">ご覧の通り、myFunc は ENTER キーで実行されるので、300ms 待たずに押してしまうと、valueChanges の購読がまだモデルを更新していないため、this.model の部分文字列しか取得できません。
En
続きを読む →
多分、さっき説明していたことは説明するのが難しいかもしれません。
実際、私はいくつかのクエリを実行するためにAWS DynamoDBを使用しており、それらをAngular4のチャート(NGX-Charts)に表示しようとしています。チャートにデータを表示するためには、データはこの例のようである必要があります var shirtInfo =
[ { "name": "Red Color", "value": 10 }, { 続きを読む →非同期関数の中で、関数が正しく完了するために await を返す必要がありますか、それとも以下のコードで問題ないですか?
const db = admin.firestore(); export const onUserCreate = functions.auth.user().onCreate(async event => { try { const user: User = { userId: event.data.uid, email: event.data.email }; await db.doc(`users/${user.userId}`).set(user, {merge: true}); } catch (error) { throw error; } });この関数はす
続きを読む →
私は関数型プログラミングにはやや初心者です。こちらは私のReactアプリからの現在のパラダイムです。私は汎用コンポーネントを持っており、その中にplaceholder引数をオプションで取る関数を渡しています。
<TableColumn field="effectiveDate" format={dateFormatter} sortable>Start Date</TableColumn> <TableColumn field="endDate" format={dateFormatter(" 続きを読む →
そのような場合に適切な型定義を取得する方法はありますか?
<Resource data={{ foo: 1 }}>{data => data.foo}</Resource>; ^ should be numberReactなしの簡単な例から始めてみましたが、かなり簡単でした:
type IResult<P> = { [key in keyof P]: P[key] }; function foo<P>( c: (data: IResult<P>) => any, props: { data: P } ) { c(props.data); } foo(data => data.foo, { // `data.foo` is number d 続きを読む →
私はこれを持っていました:
export const counterReducer: ActionReducer<number> = (state = 0, action: Action) => { const at = CounterActions; switch (action.type) { case at.incrementId: return state + 1; case at.decrementId: return state - 1; case at.resetId: r 続きを読む →