在AngularJs中查询代码

时间:2016-12-14 04:25:40

标签: angularjs

任何人都可以在AngularJs中解释这段代码吗?

'query': { method: 'GET', isArray: true, params: {fromDate: null, toDate: null} 服务

中的此代码
body {
  background-color: #000;
}
.center {
  text-align: center;
}
#Circle{
  display:none
}
@keyframes bottommotion {
  0%   {transform: rotate(0deg)}
  14%   {transform: rotate(10deg)}
  29%   {transform: rotate(-10deg)}
  45%   {transform: rotate(0deg)}
  55%   {transform: translate(0px, 38px)}
  88%   {transform: translate(0px, 0px)}
}
#Bottom { 
  transform-origin: 50% 50%;
  animation-timing-function: cubic;   
  animation-name: bottommotion;
  animation-duration: 2.5s;
  animation-iteration-count: infinite;
}
@keyframes topmotion {
  0%   {transform: rotate(0deg)}
  23%   {transform: rotate(10deg)}
  38%   {transform: rotate(-10deg)}
  45%   {transform: rotate(0deg)}
  55%   {transform: translate(0px, -54px)}
  100%   {transform: translate(0px, 0px)}
}
#Top { 
  transform-origin: 50% 50%;
  animation-timing-function: cubic;   
  animation-name: topmotion;
  animation-duration: 2.5s;
  animation-iteration-count: infinite;
}
@keyframes spotmotion {
  0%   {transform: translate(0px,0px)}
  100%   {transform: translate(154.5px,0px)}

}

#Spots { 
  transform-origin: 50% 50%;
  animation-timing-function: linear;   
  animation-name: spotmotion;
  animation-duration: .23s;
  animation-iteration-count: infinite;
}
@keyframes shadowmotion {
  0%   {opacity:0.75;  transform:translate(0px, 0px)}
  45%   {opacity:0.75; transform:translate(0px, 0px)}
  55%   {opacity:0.95;  transform:translate(0px, -6px)}
  95%   {opacity:0.75; transform:translate(0px, 0px)} 
  100%   {opacity:0.75;  transform:translate(0px, 0px)}
}
#Shadow { 
  transform-origin: 50% 50%;
  animation-timing-function: cubic;   
  animation-name: shadowmotion;
  animation-duration: 2.5s;
  animation-iteration-count: infinite;
}

1 个答案:

答案 0 :(得分:0)

您必须显示比此更多的代码,但这通常是在对象中定义属性,该对象本身包含所有这些属性。

例如它可以是这样的:

var temp = {
  'query': {
        method: 'GET',
        isArray: true,
        params: {fromDate: null, toDate: null}
  }
};

然后在某些时候(作为猜测)它可以用来创建一个http请求:

$.ajax(
   method: temp.query.method,
   url: 'some url',
   data: {temp.query.params},
   ...
);