単一のテンプレートを使用して動的にテンプレートを設定する方法はありますか? http://jsfiddle.net/cmckeachie/mtV62/light/
var routingExample = angular.module('FunnyAnt.Examples.Routing', []);
routingExample.controller('HomeController', function ($scope) {});
routingExample.controller('AboutController', function ($scope) {});
routingExample.config(function ($routeProvider) {
$routeProvider.
when('/home', {
templateUrl: 'embedded.home.html',
controller: 'HomeController'
}).
when('/about', {
templateUrl: 'embedded.about.html',
controller: 'HomeController'
}).
otherwise({
redirectTo: '/home'
});
});
「Home」と「About」の値を動的に渡すために embedded.home.html テンプレートを使用したいとします。私はAngularJSが初めてなので助けてください。