技術

Angular6で子コンポーネントに文字列を渡す

投稿日:

文字列と変数の値を渡す時、記述が少しだけ違います。

// 文字列を渡したい時
<app-example testText="hogehoge"></app-example>

// 変数を渡したい時
<app-example [testText]="hogehoge"></app-example>

簡単ですね。

-技術

執筆者:


comment

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください

関連記事

no image

【nginx/unicorn】(13: Permission denied) while connecting to upstream

どうも中田です。 AWS上でAPIサーバを構築してて、 * Webサーバ:ngi …

【Alexa Skill】ビックリするなかれ (Unsupported Directive)

どうも中田です。 みなさんAlexa使ってます?Alexaスキル作ってます? 今 …

wgetコマンドで指定のサイトをダウンロードしてみる。

wgetコマンドって? 下記の形式のコマンドを叩くと、指定のURLからファイルを …

[Rails] エラー unable to convert unpermitted parameters to hash について

こんにちは。佐藤です。 今回はRailsのpermit!についての備忘録です。 …

no image

heroku + node.jsでError R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch

こんにちは heroku + node.jsでアプリを作っていて、いざherok …