想知道如何清除Azure AppInsight中的数据?
查看Azure门户,但找不到任何要清除的选项.
我正在使用Angular2进行路由,我的页面在初始加载时显示重复的内容.一旦我点击任何链接(Page1或Page2)一切都很完美(没有更多的重复内容).为什么我在初始加载时获得重复内容,我需要将其显示一次
的index.html
<html>
<head>
<base href="/">
<title>Angular QuickStart</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<link rel="stylesheet" href="styles.css">
<!-- 1. Load libraries -->
<!-- Polyfill(s) for older browsers -->
<script src="node_modules/core-js/client/shim.min.js"></script>
<script src="node_modules/zone.js/dist/zone.js"></script>
<script src="node_modules/reflect-metadata/Reflect.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!-- 2. Configure SystemJS -->
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });
</script>
</head>
<!-- 3. Display the application -->
<body>
<my-app>
Loading...
</my-app>
</body>
</html>Run Code Online (Sandbox Code Playgroud)
App.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule …Run Code Online (Sandbox Code Playgroud) 我在plunkur有以下示例 点击这里打开链接
var app = angular.module('App', ['ui.bootstrap']);
try {
app.service('loginModalService', function ($modal, $rootScope) {
function assignCurrentUser(user) {
$rootScope.currentUser = user;
return user;
}
return function () {
var instance = $modal.open({
templateUrl: 'loginModalTemplate.html',
controller: 'LoginModalCtrl',
controllerAs: 'LoginModalCtrl',
windowClass: 'vertical-center',
backdrop: true,
backdrop: 'static',
sticky: true
})
return instance.result.then(assignCurrentUser);
};
});
} catch (e) {
alert("Error --- " + e.message);
}
//UsersAPI is service to validate on server
app.controller('LoginModalCtrl', function ($scope, loginModalService) {
this.cancel = $scope.$dismiss;
$scope.showModal = function () { …Run Code Online (Sandbox Code Playgroud)