小编Ang*_*ngu的帖子

angularjs如何在没有onclick的情况下增加ng-repeat中的init变量值?

如何在ng-repeat中增加init变量值

   <div ng-if="feedData.carouselMode == true" ng-init='start=0'  ng-repeat="a in carousel_data">

            <div  class="owl-demo" class="owl-carousel"   owl-carousel >
            <div class="item"  ng-repeat="(key, item) in a.carouselFeeds" ng-init="start=start+1">
                {{start}}
                <div ng-click="go('{{key}}', item.feedUrls.length, 'rtl')" ng-swipe-left="go('{{key}}', item.feedUrls.length, 'rtl')">
            <img class="lazyOwl"  ng-src="{{item.img}}"  />  
            <span class="innersquare" image-ja="{{item.img}}"> 
                <p ng-style="folderStyle">{{item.name  }}&nbsp;</p> </span>
                 </div> 
            </div>
        </div>
    </div>
Run Code Online (Sandbox Code Playgroud)

增量开始后ng-init start = 0 = ng-repeat中的start + 1但没有计数仅显示1.

angularjs angularjs-ng-repeat

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

如何使用角度资源风帆?

我正在使用角度资源风帆.

var items = sailsResource('roles').query(); // GET /item
$scope.roles = items;
angular.forEach($scope.roles, function(value, key) {
    console.log(key + ': ' + value);
});
Run Code Online (Sandbox Code Playgroud)

输出:未定义.

如何解析这个查询?

javascript jquery angularjs sails.js

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

html5 meta charset-utf-8无效

我正在使用这个元.

  <meta charset="UTF-8">
   <meta http-equiv="Content-type" content="text/html; charset=UTF-8">
Run Code Online (Sandbox Code Playgroud)

我用过这个文字:

<p>Vignerons de père en fils depuis 1847 notre Maison se situe au cœur du vignoble champenois, à quelques kilomètres d’Epernay sur la commune de Moussy.</p>
Run Code Online (Sandbox Code Playgroud)

显示我的文字:

Vigneronsdep reenfils depuis 1847 notre Maison se situeauc urduvignoble champenois, quelqueskilom tresd Epernaysurla commune de Moussy.

不工作charset ="UTF-8".

html meta jquery html5

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

crosswalk cordova android更新项目?

怎么解决?我正在使用将现有的Cordova应用程序迁移到Crosswalk这个命令

android update project --subprojects --path . \
        --target "android-19"
Run Code Online (Sandbox Code Playgroud)

显示此错误:

 build.xml: Found version-tag: custom. File will not be updated.
Run Code Online (Sandbox Code Playgroud)

ant android cordova

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

猫头鹰旋转木马如何使用滚动条水平?

我正在使用owl-carousel js库.我需要水平滚动条功能.我试过这个:

 $("#owl-demo").owlCarousel({
            Horizontal: true, // not working this
            items : 4,
            itemsDesktop : [1199,3],
            itemsDesktopSmall : [979,3],
            itemsTablet: [2400,4], //2 items between 600 and 0
            itemsMobile :[1200,4]           
        }); 
Run Code Online (Sandbox Code Playgroud)

单击此引用

jquery owl-carousel

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

Aws Cognito 注销和会话清除不起作用

我已将Aws Congnito联合身份验证与 React Native 中的提供程序集成,运行良好。

问题是:

当我要注销并再次登录时,它不会再次询问我的登录帐户帐户详细信息,它直接使用旧帐户并登录。

我在注销会话清除时尝试了这些代码行:

 Auth.signOut();

cognitoCredentials.clearCachedId();
cognitoCredentials = new AWS.CognitoIdentityCredentials(cognitoParams);
AWS.config.credentials = cognitoCredentials
Run Code Online (Sandbox Code Playgroud)

然后我使用 ammplity Hub 监听,事件触发良好

 Hub.listen("auth", ({ payload: { event, data } }) => {
    switch (event) {
      case "signIn":
      case 'cognitoHostedUI':
        break;
       case "signOut":
          console.log('Yes Logout');
         //clear my local 
          break;
        case 'signIn_failure':
        case 'cognitoHostedUI_failure':
          console.log('Sign in failure', data);
          break;
        case "customOAuthState":
  });
Run Code Online (Sandbox Code Playgroud)

我注意到了这一点,但我无法解决我的问题 How to Force select account while Login with Google

我想知道是否遗漏了什么,请向我提供解决方案。

amazon-web-services amazon-cognito react-native aws-amplify aws-amplify-sdk-js

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

如何在Phonegap中显示捕获视频?

我正在使用phoengap捕获视频插件,我使用了这段代码

  <!DOCTYPE html>
<html>
<head>
<title>Capture Video</title>

<script type="text/javascript" charset="utf-8" src="cordova.js"> </script>
<script type="text/javascript" charset="utf-8" src="json2.js"></script>
<script type="text/javascript" charset="utf-8">

// Called when capture operation is finished
//
function captureSuccess(mediaFiles) {
    var i, len;
    for (i = 0, len = mediaFiles.length; i < len; i += 1) {
        uploadFile(mediaFiles[i]);
    }
}

// Called if something bad happens.
//
function captureError(error) {
    var msg = 'An error occurred during capture: ' + error.code;
    navigator.notification.alert(msg, null, 'Uh oh!');
}

// A button will …
Run Code Online (Sandbox Code Playgroud)

jquery video-capture phonegap-plugins cordova

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