小编Lic*_*hte的帖子

typeahead angular ui - 无法读取undefined属性'length'

我在我的应用程序中使用Angular-ui Bootstrap.我使用typeahead指令.

HTML:

<input type="text" class="pass_code_input" ng-model="SuppPrefix" Typeahead="ddl_item.Text for ddl_item in getData($viewValue)"/>
Run Code Online (Sandbox Code Playgroud)

调节器

function AutoCompleteCtrl($scope,$http, AutoCompleteSrv) {
    $scope.getData = function (prefix) {
        AutoCompleteSrv.GetAutoComplete("Supplier", prefix).then(function (result) {
            var results_arr = [];
            angular.forEach(result.data, function (item) {
                results_arr.push({ "Val": item.Val, "Text": item.Text });
            });
            return results_arr
        });  
    };
};
Run Code Online (Sandbox Code Playgroud)

服务:

    function AutoCompleteSrv($http) {
    var _$http = $http;
    self = this;
    self.GetAutoComplete = function (DataType, Prefix) {
        var promise = _$http({
            method: "GET",
            url: 'api/AutoComplete',
            params: { 'DataType': DataType, 'Prefix': Prefix }
        }).success(function …
Run Code Online (Sandbox Code Playgroud)

angularjs angular-ui angular-ui-bootstrap

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

命名空间"Microsoft"vsts构建中不存在类型或命名空间名称"Azure"

我有一个包含多个项目的大解决方案.像那样:

main.sln

-ProjectA_api.proj  
-ProjectA_BL.proj  
-ProjectA_Common.proj  

-Project B....etc
Run Code Online (Sandbox Code Playgroud)

api消耗BL,BL消耗常见.
他们都使用nuget包.

主解决方案有一个Nuget.Config文件,用于描述存储所有包的位置.
当我在ProjectA_api.proj上从vs2017运行本地构建时,一切都正确完成.我可以将ProjectA_api.proj发布到网上.
我尝试使用VSTS构建服务自动化此过程(我的最终目标是发布到Azure Web App).

它看起来像这样:

在此输入图像描述
获取源代码任务获取此构建的所有相关源:
来自sln的Nuget.Config文件以及所有项目(API,BL,COMMON).
Restore Nuget任务具有以下设置:

  • "解决方案的路径,packages.config或project.json"= ProjectA_api.proj package.json文件的路径
    • nuget配置文件的路径= main.sln nuget.config文件
      构建解决方案任务 - 具有ProjectA_api.proj proj文件的路径

当我运行这个过程时,恢复很好,msbuild工作了一段时间,直到我收到错误:
"错误CS0234:命名空间'Microsoft'中不存在类型或命名空间名称'Azure'(你错过了一个程序集)引用?)"对于"ProjectA_Common.proj"(ProjectA_common.proj使用3个引用,其中一个是azure引用).

所有解决方案包都包含在解决方案级别包文件夹中.我还尝试为所有项目添加nuget恢复,但仍然是同样的错误.是否有可能以这种方式完成我的目标,或者我应该只针对这些项目制定单一解决方案(我不想这样做)?
谢谢

编辑
在projectA_common中我有正确的packages.config:

 <?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="Google.Protobuf" version="3.5.1" targetFramework="net461" />
  <package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.2.3" targetFramework="net452" />
  <package id="MySql.Data" version="8.0.12" targetFramework="net461" />
</packages>
Run Code Online (Sandbox Code Playgroud)

我试图更改targetFramework,但它没有用.还注意到其他包都没问题.

编辑2 - Nuget.config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <solution>
        <add key="disableSourceControlIntegration" value="true" />
    </solution>
      <config>
        <add key="repositoryPath" value="packages" />
  </config>
    <packageSources>
        <add key="nuget.org" …
Run Code Online (Sandbox Code Playgroud)

azure azure-pipelines

5
推荐指数
0
解决办法
611
查看次数

AppCenter 反应本机 ios 构建失败:“以下构建命令失败:CopyPlistFile”

我的应用程序是用本机反应构建的。
我使用 Xcode 11 进行开发,使用 App Center 进行构建。
当我在 Mac 上本地构建应用程序时,我设法构建+存档该应用程序(并在我的设备上运行它)。
但是,当我在 App Center 上构建应用程序时,出现以下错误:

以下构建命令失败: CopyPlistFile /Users/runner/Library/Developer/Xcode/DerivedData/MyApp-glnwmpshuhlwezeyiaupgnbnizsy/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app/GoogleService-Info.plist /Users/ runner/runners/2.160.1/work/1/GoogleService-Info.plist(1 次失败)[错误]错误:/usr/bin/xcodebuild 失败,返回代码:65

我确保我在应用程序中心上使用旧版构建系统(就像在本地一样)。

ios react-native visual-studio-app-center

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

希伯来语是html中的问号

我正在使用bootstrap和angularjs构建Web应用程序.在HTML中我有元标记:

<meta charset="utf-8">
Run Code Online (Sandbox Code Playgroud)

用希伯来语写的导航栏项目,没关系.当我在conatiner div中写希伯来语内容时,它也没关系.

但是当我在部分中写下希伯来语(在ng-view中显示)时,我得到了问号.

谷歌没有帮助.

有任何想法吗?

html twitter-bootstrap angularjs

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

using ng-if to secure different content on page angular js

I have div1 and div2. If a user is admin I want him to see both of them. If a user is a simple user, I want him to see only div2.

I used ng-if (beacuse it removes the div completely, and not using display:none) Is it safe? Can it be intercepted and/or changed by proxy tools and/or chrome developer tools. I didn't find any info on that.

javascript security angularjs

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

加密操作.net框架4.5.1期间发生错误

我正在使用angularjs和Web API.为了验证用户身份,我使用FormAuthenticationTicket(我只使用用户数据创建票证,加密它然后返回到客户端).当客户端发送请求时,他将此加密的cookie添加到其请求的标头中.

在远程服务器上,我解密了故障单,并验证该用户是否合法.在localhost上它完美无缺.在服务器上我有一个错误,并在很短的时间后没有识别用户.经过多次调试后,我注意到有时当服务器尝试解密票证时,他会遇到异常:"加密操作期间发生错误"

我搜索了这个错误,根据我的理解,错误是因为服务器尝试用另一个机器密钥解密票证.

想想也许在web.config中设置机器密钥会解决问题,但我发现的所有文章都在谈论早期的.net框架版本(我使用的是4.5.1).

这是我收到错误时:

FormsAuthenticationTicket fat = FormsAuthentication.Decrypt(enc_ticket);
Run Code Online (Sandbox Code Playgroud)

这是我的web.config:

     <configuration><appSettings></appSettings>

      <system.web> <compilation debug="true" targetFramework="4.5.1">
      <assemblies>
        <add assembly="System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
      </assemblies>
    </compilation>
    <httpRuntime targetFramework="4.5.1" />
    <customErrors mode="Off"/>
    <trust level="Full" />
  </system.web>
      <system.webServer>
        <handlers>
          <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
          <remove name="OPTIONSVerbHandler" />
          <remove name="TRACEVerbHandler" />
          <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
        </handlers>
      </system.webServer>
    </configuration>
Run Code Online (Sandbox Code Playgroud)

asp.net asp.net-mvc-3 form-authentication

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