scope.shitsからShitDetailControllerにデータを注入するようにAngularに指示するにはどうすればよいですか?
function ShitCtrl($scope) {
$scope.shits = [
{
"id": "goMedus",
"name": "goMedus",
"snippet": "Fast just got faster with Nexus S.",
"copy": "hallo"
},
これが、jsonを介して行われたチュートリアルのデータインジェクションです。grails urlMappingsを使用して外部jsonに接続するのに問題があるため、オスカーマイクを使用せずに取得したいので、後でこれを実行したいと思います。助けていただければ幸いです
function ShitDetailCtrl($scope, $routeParams) {
$scope.shitId = $routeParams.shitId;
}
私の見解は次のようになります。
TBD: detail view for {{shitId}} and {{shitName}}
shitIdはレンダリングされ、shitNameはレンダリングされません。