我在iPad iOS7横向模式上有一个奇怪的错误.
我能够调查的是在iOS7 window.outerHeight是692px和window.innerHeight 672px; 而在以前的版本中,两个值都是672px.
即使我<html>和<body>标签的高度为100%,似乎还有滚动的空间,奇怪的是这个问题只出现在landscpae上
你可以通过访问t.cincodias.com看看我在谈论什么,例如,在iOS 7 iPad中,页脚栏(或有时标题)将被剪切.但在以前的iOS版本中,内容在全屏显示正常.
即使我将两个标签的高度设置为height: 672px !important和position:absolute; bottom: 0;,您仍然可以通过触摸iframe垂直滚动内容(广告是iframe).
我正在运行iOS7的候选版本
谢谢你的帮助.
我正在为我的组件编写一些单元测试,我收到这个神秘的错误消息.我在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) 所以这个让我发疯,每当我尝试注入$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) 我正在使用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><!-- JSMIN (.*) -->(.*?(\r))+.*?<!-- END JSMIN --></token>
<value><script src="$1"></script></value>
</replacement>
<replacement>
<token><!-- CSSMIN (.*) -->(.*?(\r))+.*?<!-- END CSSMIN --></token>
<value><link href="$1" rel="stylesheet" type="text/css"/></value>
</replacement>
</replacements>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
对我和我的同事来说,正则表达式似乎是正确的......任何帮助?提前致谢
javascript ×2
angular ×1
angularjs ×1
css ×1
html ×1
ios7 ×1
jasmine ×1
karma-runner ×1
maven ×1
regex ×1
unit-testing ×1