Hi Colin,

If I put the below code in a plunker, they both work for me.

<!DOCTYPE html>
<html>
<head>
  <script data-require="[email protected]" data-semver="1.6.5" src=
"https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.5/angular.min.js";
></script>
  <link rel="stylesheet" href="style.css" />
  <script src="script.js"></script>
</head>
<body ng-app ng-init="testme=1">
  <h1>Hello Plunker!</h1>
  <div ng-switch on="testme">
    <div ng-switch-when="1">one one</div>
    <div ng-switch-default>one none</div>
  </div>

  <div ng-switch="testme">
    <div ng-switch-when="1">two one</div>
    <div ng-switch-default>two none</div>
  </div>
</body>
</html>

So you might have a different issue. Perhaps you did declare an `on` 
directive somewhere else in your app or something like that?

Regards
Sander


-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" 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.

Reply via email to