s9e122 multiple slots

This commit is contained in:
Tyrel Souza 2018-04-17 23:09:38 -04:00
parent fc28afcc98
commit 61dd86c91e
No known key found for this signature in database
GPG Key ID: 5A9394D4C30AEAC0
2 changed files with 12 additions and 3 deletions

View File

@ -3,8 +3,8 @@
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<app-quote> <app-quote>
<h2>{{quoteTitle}}</h2> <h2 slot="title">{{quoteTitle}}</h2>
<p>A Simple Quote</p> <p slot="content">A Simple Quote</p>
</app-quote> </app-quote>
</div> </div>
</div> </div>

View File

@ -1,6 +1,12 @@
<template> <template>
<div> <div>
<slot></slot> <div class="title">
<slot name="title"></slot>
</div>
<hr>
<div>
<slot name="content"></slot>
</div>
</div> </div>
</template> </template>
@ -21,4 +27,7 @@
h2 { h2 {
color: blue color: blue
} }
.title {
font-style: italic;
}
</style> </style>