-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
It seems that we can't use ng-show on a ui-view in v0.2.8.
Given the following:
<div ng-app="myApp">
ui-view does not play well with ng-show:
<ui-view name="main" ng-show="showView"></ui-view>
</div>
angular
.module("myApp", ["ui.router"])
.config(function ($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise("/state1");
$stateProvider
.state("state1", {
url: "",
views: {
"main": {
template: "This won't be visible when using ng-show, even though showView = {{ showView }}",
controller: function ($scope) {
$scope.showView = true;
}
}
}
});
});
The class ng-hide is always applied to the ui-view, and it is not an issue with the value of showView, because this is what the ui-view ends up containing:
<span class="ng-scope ng-binding">This won't be visible when using ng-show, even though showView = true</span>
Fiddle: http://jsfiddle.net/VhNLX
Thanks!
Metadata
Metadata
Assignees
Labels
No labels