小编Har*_*gun的帖子

Angularjs 2.0不加载templateUrl

我是新手Angularjs-2.0.我创建了一个示例应用程序,并在加载时遇到问题templateUrl.

我的app.ts文件:

import {bootstrap, Component} from 'angular2/angular2';
@Component({
    selector: 'my-app',
    templateUrl: 'grid.html'
})
class AppComponent { }
bootstrap(AppComponent);
Run Code Online (Sandbox Code Playgroud)

我改变了路径,./grid.html但它也不适合我.

谁来帮帮我..!

typescript angular

4
推荐指数
1
解决办法
3308
查看次数

如何使 Table <td> 和 <tr> 全宽?

我无法制作它的 width100%和 text middle。正如我在表格中提到的,The problem is here这个地方不是 100% 宽度,文本不在中心。我怎样才能做到?

  	.hoverTable{
		width:100%; 
		border-collapse:collapse; 
	}
	.hoverTable td{ 
		padding:7px; border:#4e95f4 1px solid;
	}
	/* Define the default color for all the table rows */
	.hoverTable tr{
		background: #b8d1f3;
	}
	/* Define the hover highlight color for the table row */
    .hoverTable tr:hover {
          background-color: #ffff99;
    }
	.hoverTable th{
		background: #b8d1f3;
	}
Run Code Online (Sandbox Code Playgroud)
<table class="hoverTable">
<tr>
	<th>The problem is here</th>
</tr>

<tr onmouseover="this.style.backgroundColor='#ffff66';" 
    onmouseout="this.style.backgroundColor='#d4e3e5';">
	
    <td>Item 1A</td>
    <td>Item 1B</td>
    <td>Item 1C</td> …
Run Code Online (Sandbox Code Playgroud)

html javascript css

1
推荐指数
1
解决办法
2930
查看次数

标签 统计

angular ×1

css ×1

html ×1

javascript ×1

typescript ×1