小编Cas*_*roe的帖子

错误的ERR!404未找到:har-validator@5.1.2

升级到angular7后,"npm install"步骤中的azure构建失败.在当地一切正常.

我试过了:

  1. 将构建定义中的clean选项设置为true,并设置为"all directories".
  2. 在安装步骤之前强制npm更新"npm @ latest -g"步骤
  3. 将Portal中"应用程序设置"中的"WEBSITE_NODE_DEFAULT_VERSION"设置为与本地版本相同的版本(10.14.1).

但我仍然从"npm install"步骤获得以下错误输出.(请注意,代理程序未使用与默认值设置相同的版本)

我的最后一个选项(我认为)是删除整个服务并创建一个具有相同名称的新服务 - 但我想避免这样做..

关于输出中的最后一个错误(npm ERR!404 Not Found:har-validator@5.1.2),我不知道这是什么,但它不包含在我的package.json中.我相信它可能是cli包正在使用的东西?

2018-12-11T21:46:07.1672265Z ##[section]Starting: npm install
2018-12-11T21:46:07.1675810Z ==============================================================================
2018-12-11T21:46:07.1675868Z Task         : npm
2018-12-11T21:46:07.1675929Z Description  : Run an npm command
2018-12-11T21:46:07.1675961Z Version      : 0.2.27
2018-12-11T21:46:07.1675996Z Author       : Microsoft Corporation
2018-12-11T21:46:07.1676309Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=613746)
2018-12-11T21:46:07.1676342Z ==============================================================================
2018-12-11T21:46:07.7212998Z [command]C:\Windows\system32\cmd.exe /D /S /C ""C:\Program Files\nodejs\npm.cmd" config list"
2018-12-11T21:46:25.4985558Z ; cli configs
2018-12-11T21:46:25.4985985Z metrics-registry = "https://registry.npmjs.org/"
2018-12-11T21:46:25.4986124Z scope = ""
2018-12-11T21:46:25.4986277Z user-agent = "npm/6.4.1 node/v10.13.0 …
Run Code Online (Sandbox Code Playgroud)

azure build-definition azure-web-sites npm-install angular7

7
推荐指数
1
解决办法
2824
查看次数

关闭AngularJS中所有打开的Bootstrap模式?

我创建了一个打开另一个模态的模态.我想使用第二个模态作为关闭第一个模式的确认框.当我在确认框(第二个模态)上单击确定时,我无法关闭两个模态.

Tree.html:

<script type="text/ng-template" id="tree_item_renderer.html">
<div class="bracket-match" ng-class="match.tier == 1 ? 'bracket-match-final' : ''">
    <p ng-show="match.tier == 1" class="finale-title">Finale</p>
   <div class="match-content">
        <div class="player-div">
           <div class="bracket-player-1 bracket-player-1-tier-{{tierCount+1-match.tier}}">
                <input class="input-player-1 input-player-name form-control" type="text" ng-model="match.player1" placeholder="Deltager 1">
           </div>
       </div>
        <div class="player-div border-bottom">
            <div class="bracket-player-2">
                <input class="input-player-2 input-player-name form-control" type="text" ng-model="match.player2" placeholder="Deltager 2">
           </div>
      </div>
    </div>
    <div ng-show="match.tier == 1 && showthirdplace && tierCount >= 2" class="third-place" ng-model="thirdplace">
        <p class="finale-title">3. plads</p>
        <div class="match-content">
            <div class="player-div">
              <div class="bracket-player-1 bracket-player-1-tier-{{tierCount+1-match.tier}}">
                    <input class="input-player-1 input-player-name form-control" type="text" ng-model="match.player1" …
Run Code Online (Sandbox Code Playgroud)

modal-dialog twitter-bootstrap angularjs

6
推荐指数
1
解决办法
7139
查看次数

AngularJS UI Bootstrap dismiss()不起作用

首先让我说我对角度很新.我试图设置一个工作正常的模态ui.但是当我点击界面上的"取消"按钮时没有任何反应.

这是我的代码:

    (function () {
        var domainName = 'TournamentCategory';
        angular.module('tournamentCategories').controller("CategoriesController",
        ['$scope', '$modal', 'guidGenerator', 'eventBus', domainName + "Service",                    
        'TournamentCategoryModelFactory',
        function ($scope, $modal, guidGenerator, eventBus, domainService, modelFactory)  
        {$scope.openTournamentTree = function () {


        var modalInstance = $modal.open({
            templateUrl: 'TournamentTreeModal.html',
            controller: 'TreeController',
            size: 'wide-90',
            resolve: {

            }
        });

        modalInstance.result.then(function (selectedItem) {
            //$scope.selected = selectedItem;
        }, function () {
            //$log.info('Modal dismissed at: ' + new Date());
        });
        };

        $scope.ok = function () {
        modalInstance.close();
        }

        $scope.cancel = function () {
        modalInstance.dismiss('cancel');
        };
        }]);
    })();
Run Code Online (Sandbox Code Playgroud)

HTML: …

modal-dialog twitter-bootstrap angularjs

1
推荐指数
1
解决办法
2万
查看次数

[routerLink]=""VS href="javascript:void(0);"

如果我想向锚标记添加死链接,因为我想使用 (click) 代替,那么我可以使用[routerLink]=""href="javascript:void(0);"。两者都有相同的效果,我认为浏览器兼容性没有区别。

更喜欢使用哪一种?有什么区别吗?

javascript anchor angular

1
推荐指数
1
解决办法
2324
查看次数