ng-switch我使用时无法正常工作ng-switch-when-separator.当我选择设置时,开关指向默认div
angular.module("myModule", [])
.controller("myController", function ($scope) {
$scope.items = ['settings', 'home', 'options', 'other'];
$scope.opt = $scope.items[0];
});Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<body ng-app="myModule">
<div ng-controller="myController">
<select ng-model="opt" ng-options="item for item in items">
</select>
<code>selection={{opt}}</code>
<hr />
<div class="animate-switch-container"
ng-switch on="opt">
<div class="animate-switch" ng-switch-when="settings|options" ng-switch-when-separator="|">Settings Div</div>
<div class="animate-switch" ng-switch-when="home">Home Span</div>
<div class="animate-switch" ng-switch-default>default</div>
</div>
</div>
</body>Run Code Online (Sandbox Code Playgroud)
我真的很困惑与angularjs中的$ compile.任何人都可以帮助我,在本文档中使用其他示例的angularjs中的$ compile有什么用处. https://docs.angularjs.org/api/ng/service/$compile
我正在创建一个在30天后到期的cookie.
这是c#
e.UserID中的代码- > username,e.rememberMe - > true
FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1,
"UserID",
DateTime.Now,
DateTime.Now.AddDays(30),
e.rememberMe,
e.UserID,
FormsAuthentication.FormsCookiePath);
// Encrypt the ticket.
string encTicket = FormsAuthentication.Encrypt(ticket);
// Create the cookie.
Response.Cookies.Add(new HttpCookie(FormsAuthentication.FormsCookieName, encTicket));
Run Code Online (Sandbox Code Playgroud)
任何的想法