小编Nik*_*ikZ的帖子

Intellij - 如何仅限本地分支

在Intellij中使用Git时,如何压缩本地分支的所有提交?我在rebase分支窗口中使用了哪些设置?

我已经尝试将Onto设置为本地/主设备和从设置到我的分支,但随后它会尝试将主设备更改合并到我的分支中,因为我每天早上都会将我的分支转换为主设备...所以不应该有冲突.然而,它几乎总是发现冲突并导致合并问题.我只想要压缩分支提交和消息,所以当我推送到Github时它只能看到一个.

在此输入图像描述

git intellij-idea git-squash intellij-14

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

角度分页 - 更新数据onclick

我正试图在角/引导网站上实现分页.我的数据显示正确的每页行数#,我有角度分页显示正确的页面数...但是如果我能找到任何地方告诉我如何使用分页来刷新我的数据页面#被点击了......?!{{currentPage}}正在更新,但不知道如何让它调用getPresentations来更新列表.

<div>
        {{noOfPages}} &nbsp; {{currentPage}} &nbsp; {{maxSize}}
        <pagination num-pages="noOfPages" current-page="currentPage"></pagination>
    </div>

<script type="text/javascript">
    angular.module('app', ['ui', 'shared', 'ui.bootstrap']).controller('AppCtl', function ($scope, $http, $window) {
        var mvc = $window.MVC;
        $scope.noOfPages = 0;
        $scope.currentPage = 1;
        $scope.maxSize = 5;

        $scope.getPresentations = function () {
            $http.get(mvc.base + "API/Presentations?page=" + $scope.currentPage + "&itemsPerPage=10")
               .success(function (result) {
                   $scope.presentations = result.Items;
                   $scope.noOfPages = result.TotalPages;
                   $scope.currentPage = result.Page;
               })
                .error(function (result, status) {
                    $scope.newModal.errors = mvc.getApiErrors(status, result);
                });
        };

        $scope.getPresentations();
    });
</script>
Run Code Online (Sandbox Code Playgroud)

paging angularjs

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

设置$ invalid和$ error不会使表单无效

我有一个表单,我正在将我的手机字段从使用正则表达式更改为intl-tel-input模块.我在检查有效的#时遇到了问题和困惑.

我有一个包含其中几个字段的表单......

<div class="row">
<div class="col-xs-2">
    <label for="cellPhone"
           translate>CONTACT.CELL</label>
</div>
<div class="col-xs-6"
     ng-class="{'has-error': !cellPhoneFocus && forms.contactForm.cellPhone.$invalid && forms.contactForm.cellPhone.$touched }">
    <input type="text" class="form-control intlPhoneInput"
           id="cellPhone" name="cellPhone"
           ng-model="contact.cellPhone.display"
           ng-focus="cellPhoneFocus = true"
           ng-blur="cellPhoneFocus = false; validatePhone($event)">
    <div ng-messages="forms.contactForm.cellPhone.$error"
         ng-show="!cellPhoneFocus && forms.contactForm.cellPhone.$touched"
         class="errorMessages">
        <p ng-message="pattern" translate>
            CRUD.VALID_PHONE</p>
    </div>
</div>
Run Code Online (Sandbox Code Playgroud)

提交......

<button type="submit" class="btn btn-primary" ng-disabled="forms.contactForm.$invalid" id="saveContactLink" translate>CRUD.SAVE</button>
Run Code Online (Sandbox Code Playgroud)

然后在我的控制器(Typescript)...

//In Constructor
$scope.validatePhone = this.validatePhone.bind(this);

//Outside constructor
private validatePhone(eventObject: any) {
    let thePhoneField = $('#' + eventObject.target.id);
    let phoneIsValid = thePhoneField.intlTelInput("isValidNumber");

    this.$scope.forms.contactForm[eventObject.target.id].$invalid = !phoneIsValid;
    this.$scope.forms.contactForm[eventObject.target.id].$error = …
Run Code Online (Sandbox Code Playgroud)

validation angularjs typescript intl-tel-input

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

EXTJS网格存储加载 - 添加参数?

我正在将asp转发器转换为EXTJS网格.转发器上方是下拉列表和单选按钮列表.下拉列表选择转发器显示的客户端数据,radiobuttonlist选择查询类型(默认,资源或角色).目前,当更改ddl或radiobutton时,页面将使用新数据进行回发.

我不知道如何通过extjs store api GET调用将这两个对象的值传递到后端的静态Web服务中.

extjs存储代码......

store: Ext.create('Ext.data.Store', {
                    autoLoad: true,
                    autoSync: false,
                    model: 'Assembly',
                    proxy: {
                        type: 'ajax',
                        headers: { "Content-Type": 'application/json' },
                        api: {
                            read: '/Admin/BillRateData.aspx/Get'
                        },
                        reader: {
                            type: 'json',
                            root: function (o) {
                                if (o.d) {
                                    return o.d;
                                } else {
                                    return o.children;
                                }
                            }
                        },
                        writer: {
                            type: 'json',
                            root: 'jsonData',
                            encode: false,
                            allowSingle: false
                        },
                        listeners: {
                            exception: function (proxy, response, operation) {
                                Ext.MessageBox.show({
                                    title: "Workflow Groups Error",
                                    msg: operation.action + ' Operation Failed: …
Run Code Online (Sandbox Code Playgroud)

web-services extjs parameter-passing

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