小编Ped*_*ota的帖子

IOS 7 - css - html高度 - 100%= 692px

我在iPad iOS7横向模式上有一个奇怪的错误.

我能够调查的是在iOS7 window.outerHeight是692px和window.innerHeight 672px; 而在以前的版本中,两个值都是672px.

即使我<html><body>标签的高度为100%,似乎还有滚动的空间,奇怪的是这个问题只出现在landscpae上

你可以通过访问t.cincodias.com看看我在谈论什么,例如,在iOS 7 iPad中,页脚栏(或有时标题)将被剪切.但在以前的iOS版本中,内容在全屏显示正常.

即使我将两个标签的高度设置为height: 672px !importantposition:absolute; bottom: 0;,您仍然可以通过触摸iframe垂直滚动内容(广告是iframe).

我正在运行iOS7的候选版本

谢谢你的帮助.

html css mobile-safari ios7

50
推荐指数
3
解决办法
2万
查看次数

Angular 4 Unit测试错误 - 无法在'XMLHttpRequest'上执行'send':无法加载'ng:///DynamicTestModule/LoginComponent.ngfactory.js'

我正在为我的组件编写一些单元测试,我收到这个神秘的错误消息.我在Angular 2单元测试中发现了类似的问题- 获取错误无法加载'ng:///DynamicTestModule/module.ngfactory.js',但答案并没有帮助我解决我的问题.我很有棱角4.3.2

这是我正在编写测试的组件:

import {Component} from '@angular/core';
import {Router} from '@angular/router';

import {NotificationService} from '../common/notification/notification.service';
import {SessionService} from '../common/session/session.service';
import {Login} from './login.model';

@Component({
             selector: 'cc-login-form',
             templateUrl: './login.component.html',
             styleUrls: ['./login.component.scss'],
           })
export class LoginComponent {
  model: Login = new Login('', '');

  constructor(private sessionService: SessionService,
              private router: Router,
              private notificationService: NotificationService) {
  }

  onSubmit() {
    this.sessionService
        .login(this.model.email, this.model.password)
        .subscribe(
          sessionInfo => {
            this.notificationService.showSuccess('notification.successfully.logged.in');
            this.router.navigate([`/cc/list`]);
          },
          error => this.notificationService.showError('notification.invalid.login')
        );
  }
}
Run Code Online (Sandbox Code Playgroud)

这是测试文件:

import {async, ComponentFixture, TestBed} …
Run Code Online (Sandbox Code Playgroud)

javascript unit-testing angular

21
推荐指数
2
解决办法
2万
查看次数

AngularJS测试 - 注入$ location导致错误

所以这个让我发疯,每当我尝试注入$location我的一个测试时,我得到以下错误:

TypeError: undefined is not a function
    at $LocationProvider.$get (bower_components/angular/angular.js:11053:34)
    at Object.invoke (bower_components/angular/angular.js:4118:17)
    at bower_components/angular/angular.js:3936:37
    at getService (bower_components/angular/angular.js:4077:39)
    at Object.invoke (bower_components/angular/angular.js:4109:13)
    at Object.workFn (bower_components/angular-mocks/angular-mocks.js:2159:20)
Error: Declaration Location
    at window.inject.angular.mock.inject (bower_components/angular-mocks/angular-mocks.js:2144:25)
    at Suite.<anonymous> (test/unit/controllers/DashboardCtrlSpec.js:8:16)
    at jasmineInterface.describe (/usr/local/lib/node_modules/karma-jasmine/lib/boot.js:59:18)
    at test/unit/controllers/DashboardCtrlSpec.js:1:1
Run Code Online (Sandbox Code Playgroud)

karma.conf.js:

module.exports = function (config) {
    config.set({

        // base path that will be used to resolve all patterns (eg. files, exclude)
        basePath: '../',


        // frameworks to use
        // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
        frameworks: ['jasmine'],


        // list of files / patterns to …
Run Code Online (Sandbox Code Playgroud)

javascript jasmine angularjs karma-runner

3
推荐指数
1
解决办法
3502
查看次数

Maven replacer插件,正则表达式没有用

我正在使用Maven开发一个项目,并使用maven-replacer-plugin替换缩小版本的所有css/javascript文件.

我想替换这个:

<!-- JSMIN js/script.min.js -->
    <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
    <script src="js/jquery.placeholder.min.js"></script>
    <script src="js/smoothscroll.js" async=""></script>
    <script src="js/javascript.js"></script>
    <script src="js/swfobject.js"></script>
    <script src="js/player.js"></script>
<!-- END JSMIN -->
Run Code Online (Sandbox Code Playgroud)

有了这个:

<script src="js/script.js"></script>
Run Code Online (Sandbox Code Playgroud)

与css类似.

该插件说它已将正则表达式应用于我的4个html文件,这是正确的,但我看到这些文件没有变化.

这是插件的配置

<plugin>
    <groupId>com.google.code.maven-replacer-plugin</groupId>
    <artifactId>maven-replacer-plugin</artifactId>
    <executions>
        <execution>
            <phase>prepare-package</phase>
            <goals>
                <goal>replace</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <basedir>${project.basedir}/src/main/webapp/</basedir>
        <outputDir>test</outputDir>
        <includes>
            <include>**/*.html</include>
        </includes>
        <regexFlags>
            <regexFlag>CASE_INSENSITIVE</regexFlag>
            <regexFlag>MULTILINE</regexFlag>
            <regexFlag>DOTALL</regexFlag>
        </regexFlags>
        <replacements>
            <replacement>
                <token>&lt;!-- JSMIN (.*) --&gt;(.*?(\r))+.*?&lt;!-- END JSMIN --&gt;</token>
                <value>&lt;script src="$1"&gt;&lt;/script&gt;</value>
            </replacement>
            <replacement>
                <token>&lt;!-- CSSMIN (.*) --&gt;(.*?(\r))+.*?&lt;!-- END CSSMIN --&gt;</token>
                <value>&lt;link href="$1" rel="stylesheet" type="text/css"/&gt;</value>
            </replacement>
        </replacements>
    </configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)

对我和我的同事来说,正则表达式似乎是正确的......任何帮助?提前致谢

regex maven

2
推荐指数
1
解决办法
6854
查看次数