角NG格嵌套标签 [英] Angular ng-grid in a nested tab

查看:212
本文介绍了角NG格嵌套标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基于这普拉克的应用程序。

我的应用程序已经成长&安培;它可能过大和放大器;复后在这里,所以我们就继续讨论其所依据的普拉克。

My app has grown & it probably too large & complex to post here, so let's just continue to discuss the Plunk on which it is based.

基本上,我只想用一个NG网,与从服务器接收到的JSON数据,在嵌套的标签之一,我将填充。

Basically, I just want to use an ng-grid, which I will populate with JSON data received from a server, on one of the nested tabs.

这是行不通的,所以我试图通过NG-电网为例确切code简化问题(见的 http://angular-ui.github.io/ng-grid/ )。

That wasn't working, so I tried to simplify the problem by using the exact code of the ng-grid example (see http://angular-ui.github.io/ng-grid/).

这仍然没有工作,所以我试图通过添加NG-电网演示,以在其上我的code是基于普拉克简化问题。

That still wasn't working, so I tried to simplify the problem by adding the ng-grid demo to the Plunk on which my code is based.

这仍然不能正常工作,如由这个分叉普拉克 。如果你看一下它,你可以搜索 @@@@开始@@@@ @@@@结束@@@@ 来看看有什么我加入到这三个文件。

That still isn't working, as shown by this forked Plunk. If you look at it, you can search for @@@@ begin @@@@ and @@@@ end @@@@ to see what I added to each of the three files.

请注意:在我的应用程序,我可以看到表的内容,但左对齐和放大器;互相覆盖,仿佛有一个最大宽度或其它CSS属性的参与。在我的分叉普拉克,网格显示为空。

Note: In my app, I can see the table contents, but left aligned & overwriting each other, as if there was a maximum width or other CSS attribute involved. In my forked plunk, the grid appears to be empty.

我完全坚持这一&安培;将大大AP preciate任何帮助,你可以给。谢谢你。

I am totally stuck with this & would greatly appreciate any help which you can give. Thanks.

推荐答案

叉形普拉克不包括 ngGrid 脚本或jQuery的,它的取决于

The forked plunk did not include the ngGrid scripts or jQuery, which it depends on.

<script data-require="jquery@*" data-semver="2.0.3" src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
<script data-require="ng-grid@*" data-semver="2.0.7" src="//cdnjs.cloudflare.com/ajax/libs/ng-grid/2.0.7/ng-grid.js"></script>
<script data-require="ng-grid@*" data-semver="2.0.7" src="//cdnjs.cloudflare.com/ajax/libs/ng-grid/2.0.7/ng-grid-flexible-height.min.js"></script>

您还需要注入 ngGrid 到您的应用程序:

You also need to inject ngGrid into your app:

var app = angular.module('plunker', ['ui.bootstrap', 'ui.bootstrap.tpls', 'ui.router', 'ngGrid'])

下面是一个更新到你的普拉克,这些变化包括:的http:// plnkr.co/edit/V0itOu?p=$p$pview

Here is an update to your plunk, with these changes included: http://plnkr.co/edit/V0itOu?p=preview

这篇关于角NG格嵌套标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆