小编use*_*351的帖子

AngularJS + Jasmine:比较对象

我刚刚开始为我的AngularJS应用程序编写测试,我在Jasmine中这样做.

以下是相关的代码段

ClientController:

'use strict';

adminConsoleApp.controller('ClientController',
    function ClientController($scope, Client) {

        //Get list of clients
        $scope.clients = Client.query(function () {
            //preselect first client in array
            $scope.selected.client = $scope.clients[0];
        });

        //necessary for data-binding so that it is accessible in child scopes.
        $scope.selected = {};

        //Current page
        $scope.currentPage = 'start.html';

        //For Client nav bar
        $scope.clientNavItems = [
            {destination: 'features.html', title: 'Features'},
        ];

        //Set current page
        $scope.setCurrent = function (title, destination) {
            if (destination !== '') {
                $scope.currentPage = destination;
            }

        };

        //Return path …
Run Code Online (Sandbox Code Playgroud)

javascript tdd unit-testing jasmine angularjs

43
推荐指数
4
解决办法
5万
查看次数

源代码管理中的.vcxproj

我一直在阅读很多关于是否应该将vcxproj文件添加到源代码控制的问题.共识似乎是他们应该的,但是在打开文件时我注意到其中包含了许多用户特定的路径.

看到这是一个由许多人工作的项目,我还应该将其添加到源代码管理中吗?看起来它会与其他人的设置发生冲突.

c++ visual-studio-2010

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