小编Rad*_*dek的帖子

Angular 2.如何检测组件当前是否在视口中

我想检测组件的位置.当前是在视口中,如果是,则运行触发器,该触发器在此特定组件上统计动画.

我找不到任何"有角度"的方法来做到这一点.

示例app(主要组件)每个div都是app的一个独立组件:

<div id="one">ww</div>
<div id="two">aa</div>
<div id="three">rr</div>
<div id="four">asf</div>
<div id="five">Something...</div>
<div id="six">rq</div>
Run Code Online (Sandbox Code Playgroud)

所以......我想检测组件五何时在视口中(出现在屏幕上)并开始为该组件设置动画.

有任何想法吗?

谢谢

javascript animation dom typescript angular

9
推荐指数
1
解决办法
9504
查看次数

*无法识别的字段:数据库您的意思是?: - metrics - server - logging - DROPWIZARD

在我的应用程序配置文件(server.yml)中添加数据库详细信息后,我无法启动我的dropwizard应用程序.

server.yml(app配置文件)

server:
  applicationConnectors:
  - type: http 
    port: 8080
  adminConnectors:
  - type: http
    port: 9001

database:
  # the name of your JDBC driver
  driverClass: org.postgresql.Driver

  # the username
  user: dbuser

  # the password
  password: pw123

  # the JDBC URL
  url: jdbc:postgresql://localhost/database

  # any properties specific to your JDBC driver:
  properties:
    charSet: UTF-8

  # the maximum amount of time to wait on an empty pool before throwing an exception
  maxWaitForConnection: 1s

  # the SQL query to run when validating a connection's …
Run Code Online (Sandbox Code Playgroud)

postgresql yaml jdbc dropwizard

6
推荐指数
2
解决办法
5814
查看次数

标签 统计

angular ×1

animation ×1

dom ×1

dropwizard ×1

javascript ×1

jdbc ×1

postgresql ×1

typescript ×1

yaml ×1