如何使用角度更改模板

时间:2015-07-25 01:48:45

标签: angularjs

我刚开始学习角度。

我有以下内容:

app.config(['$routeProvider',
        function($routeProvider) {
            $routeProvider.
                when('/', {
                    controller: 'RouteCtrl',
                    templateUrl: 'views/partials/index.html'
                }).
                when('/about', {

                    templateUrl: 'views/partials/about.html'
                }).
                when('/contact', {

                    templateUrl: 'views/partials/contact.html'
                }).
                when('/login', {
                    templateUrl:  'themes/admin/views/admin/partials/login.html'
                }).
                otherwise({
                    templateUrl: 'views/partials/index.html',
                    controller: function ($scope) {
                        $scope.message = 'Welcome!!';
                      }
                });
        }
    ]);

登录应该具有与其他视图完全不同的布局。 在yii中我会提出类似$this->layout = admin-column1;

的内容

如何从布局切换角度,因为我有两种不同类型的布局,一种来自我的网站和一种管理cms布局?

问题是ng-view使用相同的<head></head>和页脚包含,我想动态地更改它。

0 个答案:

没有答案