技術

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

投稿日:

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

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

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

簡単ですね。

-技術

執筆者:


comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

関連記事

no image

document.querySelectorで色々なDOMを取得する

こんにちは javascriptでDOMを取得することは結構あるかと思います。 …

Google Web Developers便利なコマンドラインAPIの使い方

こんにちは。佐藤です。 今回はGoogle Web Developersで使える …

no image

【gem/bundle】あんたたち一体どういう関係なのよ!!

どうも中田です。 今回はgemとbundleの話。 前置き よくあるgemの説明 …

no image

【Angular】Delete methodにbodyデータを付与する

こんにちは 今回はAngularのDeleteメソッドでbodyデータを付与する …

[ Ionic ]Cannot find module ‘../node_modules/xml2js’ でVRプラグインを消せない!

こんにちは。たなかです。 Ionicでandroidをbuild中、下記のような …