Hello,
i have a html code with two divs inside. On my old code i hide and them by
the ng-hide directive.
Now i must change this on ng-if and i have problems with it.
My old Code:
(function () {
cip.controller('AuswahlCtrl', ['$scope', '$rootScope', function
($scope, $rootScope) {
$scope.MaskToShow = "myFirstDiv";
$scope.$on('showFirstDiv', function (event, args) {
$scope.MaskToShow = "myFirstDiv";
});
$scope.$on('showSecondDiv', function (event, args) {
$scope.MaskToShow = "mySecondDiv";
});
}]);
....
<div>
<div id="FirstDiv" ng-controller="AuswahlCtrl" runat="server"
ng-hide="MaskToShow != 'myFirstDiv'">
...
</div>
<div id="SecondDiv" ng-controller="AuswahlCtrl" runat="server"
ng-hide="MaskToShow != 'mySecondDiv'">
...
</div>
</div>
Please, what i must do this works with ng-if?
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.