當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript IAugmentedJQuery.find方法代碼示例

本文整理匯總了TypeScript中angular.IAugmentedJQuery.find方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript IAugmentedJQuery.find方法的具體用法?TypeScript IAugmentedJQuery.find怎麽用?TypeScript IAugmentedJQuery.find使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在angular.IAugmentedJQuery的用法示例。


在下文中一共展示了IAugmentedJQuery.find方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1:

        var getTitles = () => {
            var thead = elm.find('thead');
            var rows = thead.find('tr');
            var titles = ng1.element(rows[0]).find('th');

            return ng1.element(titles).text().trim().split(/\s+/g)
        };
開發者ID:Timeyit,項目名稱:main,代碼行數:7,代碼來源:tableDynamicSpec.spec.ts

示例2: it

        it('should show/hide columns', () => {
            var tbody = elm.find('tbody');

            scope.tableParams = new NgTableParams({}, {
                dataset: dataset
            });
            scope.$digest();

            var headerRow = ng1.element(elm.find('thead').find('tr')[0]);
            expect(headerRow.find('th').length).toBe(3);

            var filterRow = ng1.element(elm.find('thead').find('tr')[1]);
            expect(filterRow.find('th').length).toBe(3);

            var dataRow = ng1.element(elm.find('tbody').find('tr')[0]);
            expect(dataRow.find('td').length).toBe(3);

            scope.showName = false;
            scope.$digest();
            expect(headerRow.find('th').length).toBe(2);
            expect(filterRow.find('th').length).toBe(2);
            expect(dataRow.find('td').length).toBe(2);
            expect(ng1.element(headerRow.find('th')[0]).text().trim()).toBe('Age');
            expect(ng1.element(headerRow.find('th')[1]).text().trim()).toBe('Money');
            expect(ng1.element(filterRow.find('th')[0]).find('input').length).toBe(0);
            expect(ng1.element(filterRow.find('th')[1]).find('select').length).toBe(1);
        });
開發者ID:Timeyit,項目名稱:main,代碼行數:27,代碼來源:tableSpec.spec.ts

示例3: it

        it('should show/hide columns', () => {
            const tbody = tableElm.find('tbody');

            scope.tableParams = new NgTableParams({
                page: 1, // show first page
                count: 10 // count per page
            }, {
                    dataset: dataset
                });
            scope.$digest();

            const headerRow = ng1.element(tableElm.find('thead').find('tr')[0]);
            expect(headerRow.find('th').length).toBe(3);

            const filterRow = ng1.element(tableElm.find('thead').find('tr')[1]);
            expect(filterRow.find('th').length).toBe(3);

            const dataRow = ng1.element(tableElm.find('tbody').find('tr')[0]);
            expect(dataRow.find('td').length).toBe(3);

            scope.cols[0].show = false;
            scope.$digest();
            expect(headerRow.find('th').length).toBe(2);
            expect(filterRow.find('th').length).toBe(2);
            expect(dataRow.find('td').length).toBe(2);
            expect(ng1.element(headerRow.find('th')[0]).text().trim()).toBe('Age');
            expect(ng1.element(headerRow.find('th')[1]).text().trim()).toBe('Money');
            expect(ng1.element(filterRow.find('th')[0]).find('input').length).toBe(0);
            expect(ng1.element(filterRow.find('th')[1]).find('select').length).toBe(1);
        });
開發者ID:QuBaR,項目名稱:ng-table,代碼行數:30,代碼來源:tableDynamic.spec.ts

示例4: it

        it('should show/hide columns', inject(function (NgTableParams: ITableParamsConstructor<IPerson>) {
            var tbody = elm.find('tbody');

            scope.tableParams = new NgTableParams({
                page: 1, // show first page
                count: 10 // count per page
            }, {
                    dataset: dataset
                });
            scope.$digest();

            var headerRow = ng1.element(elm.find('thead').find('tr')[0]);
            expect(headerRow.find('th').length).toBe(3);

            var filterRow = ng1.element(elm.find('thead').find('tr')[1]);
            expect(filterRow.find('th').length).toBe(3);

            var dataRow = ng1.element(elm.find('tbody').find('tr')[0]);
            expect(dataRow.find('td').length).toBe(3);

            scope.cols[0].show = false;
            scope.$digest();
            expect(headerRow.find('th').length).toBe(2);
            expect(filterRow.find('th').length).toBe(2);
            expect(dataRow.find('td').length).toBe(2);
            expect(ng1.element(headerRow.find('th')[0]).text().trim()).toBe('Age');
            expect(ng1.element(headerRow.find('th')[1]).text().trim()).toBe('Money');
            expect(ng1.element(filterRow.find('th')[0]).find('input').length).toBe(0);
            expect(ng1.element(filterRow.find('th')[1]).find('select').length).toBe(1);
        }));
開發者ID:Timeyit,項目名稱:main,代碼行數:30,代碼來源:tableDynamicSpec.spec.ts


注:本文中的angular.IAugmentedJQuery.find方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。