Social Cards
Reusable card layouts to use in Social Feeds
Importing
import { pgCardSocialModule } from '../@pages/components/card-social/card-social.module';
@NgModule({
imports: [pgCardSocialModule,...]
})
export class AppModule(){}How to use
<pgcardsocial
Type="text"
AdditionalClasses="col1"
Source="{{item.post.caption}}"
Timestamp="{{item.post.timestamp}}"
Author="{{item.author.name}}"
Activity="{{item.post.activity}}"
Location="{{item.post.location}}">
<ng-template #AuthorAvatar>
<img alt="Avatar" width="33" height="33" pgRetina src2x="{{item.author.avatar2x}}" src1x="{{item.author.avatar}}" src="{{item.author.avatar2x}}">
</ng-template>
<ng-template #CustomBody>
<p>{{item.post.body}}</p>
</ng-template>
</pgcardsocial>item = {
"author": {
"name" : "Jeff Curtis",
"avatar": "assets/img/profiles/8.jpg",
"avatar2x": "assets/img/profiles/8x.jpg"
},
"post" : {
"type": "text",
"location": "SF, California",
"activity": "Shared a Tweet",
"body": "What you think, you become. What you feel, you attract. What you imagine, you create - Buddha. #quote",
"caption" : "via Twitter",
"image": "",
"timestamp": "few seconds ago",
"likes": "34", "comments": "456"
}
}Options
Templates
Last updated