有没有办法将 3 个元素的高度绑定到 1 个元素高度?
我正在尝试使绑定工作(遵循youtube上的教程).在这一点上,我基本上是复制粘贴代码; 它仍然没有用.
这是routes.php:
Route::model('song', 'App\Song');
Route::get('songs', 'SongsController@index');
Route::get('songs/{slug}', 'SongsController@show');
Route::get('songs/{slug}/edit', 'SongsController@edit');
Route::patch('songs/{slug}', 'SongsController@update');
Run Code Online (Sandbox Code Playgroud)
Song.php:
<?php
namespace App;
use Illuminate\Database\Eloquent\Model as Eloquent;
class Song extends Eloquent {
protected $fillable = [
'title', 'lyrics'
];
}
Run Code Online (Sandbox Code Playgroud)
和SongsController.php:
<?php
namespace App\Http\Controllers;
use Illuminate\Routing\Controller;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Song;
class SongsController extends Controller
{
public function index(Song $song) {
$songs = $song->get();
return view('songs.index', compact('songs'));
}
public function show(Song $song) {
return view('songs.show', compact('song'));
}
public function edit($slug) {
$song = …
Run Code Online (Sandbox Code Playgroud) 我正在尝试在angular 2中使用样式绑定,但是以某种方式我错过了导致其无法正常工作的部分。目的是使默认文本为灰色,并且当用户单击它时(尚未创建代码),该文本将变为deeppink。但是在测试样式属性时,它似乎不起作用。
import { Component } from "@angular/core"
@Component({
selector: "like",
template: `
<i class="glyphicon glyphicon-heart" [style.color]="color ? 'grey' : 'deeppink'" style="font-size: 100px;"></i>
`
})
export class LikeComponent {
count: number = 10;
color: true;
}
Run Code Online (Sandbox Code Playgroud) 在我的应用程序有一个List
的string
S,但我不能找出如何/不知道如何向此列表绑定到StackPanel
。
我试过使用 aListBox
但它的滚动特性ListBox
对我的应用程序的用户来说非常不方便。
那么有谁知道我如何将 a List
of string
s绑定到 a StackPanel
?
我试过弄乱几个属性,但没有找到任何东西。
谢谢你的帮助!
我正在尝试学习Haskell,但它有点难,因为我的绑定不会从命令行记住; 我的终端输出如下.
> let b = []
> b
[]
> 1:b
[1]
> b
[]
Run Code Online (Sandbox Code Playgroud)
我不知道为什么这样可以请任何人帮忙.