Bootstrap jumbotron无效

时间:2017-01-22 10:18:46

标签: angularjs twitter-bootstrap angular-ui-bootstrap

我正在尝试在我的Angular 2示例项目中使用jumbotron,但它并不是所有渲染任何东西。

我在index.html中使用了更新的CDN:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>


  <!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

我的app.component看起来像

import { Component } from '@angular/core';

@Component({
  selector: 'my-app',
  templateUrl: `mytemplate.html`,
})
export class AppComponent  { 


}

mytemplate.html看起来像

<div class="container">
  <div class="jumbotron">

    <h1>Bootstrap Tutorial</h1>      
  </div>
  <p>This is some text.</p>      
  <p>This is another text.</p>      
</div>

但它没有得到渲染。它一直在这里显示加载appcomponent内容。我是否需要安装任何外部软件包才能使其运行。我正在使用Visual Studio Code。提前致谢

0 个答案:

没有答案