我正在使用最新版本构建我的第一个角度应用程序,我需要一些帮助以在特定位置显示一些信息。
app.component.ts:
socials = [
{
name: 'Github',
icon: 'fa fa-github fa-2x',
link: 'https://www.github.com/..';
},
{
name: 'Twitter',
icon: 'fa fa-twitter fa-2x',
link: 'https://www.twitter.com/..';
},
{
name: 'Keybase',
icon: '',
link: 'https://keybase.io/..';
},
...
..
.
Run Code Online (Sandbox Code Playgroud)
app.component.html:
<div class="footer">
<div class="row">
<div class="col-sm-12 links" *ngFor="let social of socials">
<a href={{social.link}} target="_blank">
<i class={{social.icon}} aria-hidden="true"></i>
<span>{{social.name}}</span>
</a>
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
所以这个显示如下: 垂直:(
但是我我想像这样水平显示:水平:)
所以在使用* ngfor加载这些信息时我该怎么做?如果我不能,你对我有什么建议?