angular js中的分页样式 [英] Pagination style in angular js

查看:91
本文介绍了angular js中的分页样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是angular js的新手.我想知道如何在分页框(视图)上应用样式.下面的代码提供了矩形框视图.

I am new to angular js. I want to know how to apply a style on a pagination box(view). The code below provides the rectangular box view.

<!-- table here -->

<dir-pagination-controls max-size="2" direction-links="true"
 boundary-links="true"> </dir-pagination-controls>

我想要下面的样式.

如何在角度分页中添加上述样式?

How can I add the above style in the angular pagination?

推荐答案

上面您使用指令进行分页. 事情是指令可以有一些单独的逻辑,也可以有自己的HTML模板 例如

Above you use directive for pagination. The thing is directive can have some separate logic and it also can have it own HTML template e.g.

angular.module('docsSimpleDirective', [])
.directive('myCustomer', function() {
  return {
    template: 'Name: {{customer.name}} Address: {{customer.address}}'
  };
});

如您所见,这里的模板只是一些字符串,但它很容易像html一样:

As you can see here template just some string but it easy can be html like:

template: '<divid="paginator"><span>1</span><span>2</span></div>'

因此,如果您想更改HTML的外观,则需要在CSS中添加样式:)

So if you want to change how HTML looks like you need to add style in your CSS :)

如果您的网站结构较为复杂,则可以查看

If you have more complicated structure of website you can have a look at this question as well

您可以在此处找到有关指令的更多信息: https://docs.angularjs.org/guide/指令

You can find more about directives in here : https://docs.angularjs.org/guide/directive

这篇关于angular js中的分页样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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