我正在按照angularJS书中的教程进行操作,并且必须设置服务器.这是server.js文件:
 var express = require('express');
  var app = express();
   app.use('/', express.static('./'));
    app.listen(80);
我收到此错误:
$ node server.js
events.js:154
      throw er; // Unhandled 'error' event
      ^
Error: listen EACCES 0.0.0.0:80
我已经知道,错误EACCES意味着我没有端口80的访问权限,但我不知道如何解决这个问题.任何帮助非常感谢!
我真的没有得到这个chrome错误:
未捕获的SecurityError:无法在"历史记录"上执行"replaceState":无法在原点为"null"的文档中创建
在Edge,Firefox和IE中没有错误.
我使用jquery 1.11.1和jquery mobile 1.4.5.
这是我的索引文件:
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="css/xy.min.css" />
    <link rel="stylesheet" href="css/jquery.mobile.icons.min.css" />
    <link rel="stylesheet" href="css/jquery.mobile.structure-1.4.5.min.css" />
    <title></title>
</head>
<body>
    <div data-role="page">
       <div data-role="header" data-add-back-btn="true">
           <p align="center">Test</p>
       </div>
        <ul data-role="listview" data-filter="true" data-filter-placeholder="Kategorie suchen"  data-inset="true" data-count-theme="b">
            <li><a href="assets/beck/index.html" data-rel"dialog" rel ="external">Bäckereien </a></li>
        </ul>
    </div>
    <script src="js/jquery-1.11.1.min.js"></script>
    <script src="js/jquery.mobile-1.4.5.min.js"></script>
</body>
</html>
任何帮助非常感谢!
就像标题所说,我想用正则表达式删除字符串中的下划线.这就是我所拥有的:
  function palindrome(str) {
     str = str.toLowerCase().replace(/[^a-zA-Z]/g, '',/\s/g, '',/[0-9]/g,'');  
        if (str.split("").reverse().join("") !== str) {
           return false;
        }
        else {
           return true;
        }
   }
palindrome("eye");
经过多次谷歌搜索后,我无法找到解决方案.我有一个带有PDF的UIWebView.
我不想要视图:"第1页,共20页"查看PDF文件时左上角的小视图.有可能删除这个吗?
我对Typescript和Ionic 2很新,我试图通过Ionic 2搜索栏过滤json响应.
这是我的代码:
import {Component} from '@angular/core';
import {NavController} from 'ionic-angular';
import {Http} from '@angular/http';
import 'rxjs/add/operator/map';
@Component({
  templateUrl: 'build/pages/home/home.html'
})
export class HomePage {
  posts: any;
  private searchQuery: string = '';
  private items: string[];
  constructor(private http: Http) {
    this.initializeItems();
    this.http.get('https://domain.co/open.jsonp').map(res => res.json()).subscribe(data => {
        this.posts = data;
        console.log(this.posts);
    });
  }
  initializeItems() {
    this.items = this.posts;
  }
  getItems(ev: any) {
    // Reset items back to all of the items
    this.initializeItems();
    // set val to the value of the searchbar …我有这个数组:
[{"name": "Olvier", "id": 123 }, {"name": "Olvier", "id": 124 }]
现在我的目标是防止再次将相同的对象添加到数组中:
{"name": "Olvier", "id": 123 }
有没有办法做到这一点?
每当我localhost:3000/home.html在 chrome 中打开时,chrome 不会将其识别为 URL,而是将其识别为搜索词。
localhost:3000/home.html#工作没有问题。 
localhost:3000/projects.html也有效。(以及任何其他 URL)
这是什么原因造成的?还有其他人有这个问题吗?
我有一个带有 5 个选项卡的选项卡布局。当我导航到第二个选项卡然后导航到子页面时,导航回ion-back-button第一个选项卡上的土地。如何返回上次选择的选项卡?
非常感谢任何帮助!
const routes: Routes = [
  { path: '', loadChildren: './tabs/tabs.module#TabsPageModule' },
  { path: 'home', loadChildren: './home/home.module#HomePageModule' },
  { path: 'timetable', loadChildren: './timetable/timetable.module#TimetablePageModule' },
  { path: 'artistDetail/:id', loadChildren: './artist-detail/artist-detail.module#ArtistDetailPageModule' },
  { path: 'artist', loadChildren: './artist/artist.module#ArtistPageModule' },
];
标签路线:
const routes: Routes = [
  {
    path: 'tabs',
    component: TabsPage,
    children: [
      {
        path: '',
        redirectTo: '/tabs/(home:home)',
        pathMatch: 'full',
      },
      {
        path: 'home',
        outlet: 'home',
        component: HomePage
      },
      {
        path: 'timetable',
        outlet: 'timetable',
        component: TimetablePage
      },
      { …我有一个简单的html文件:
<StackLayout orientation="vertical" actionBarHidden="true">
      <Image src="res://buy" stretch="none" horizontalAlignment="center"></Image>
</StackLayout>
但是当我使用时:
<Page actionBarHidden="true">
  <StackLayout orientation="vertical">
      <Image src="res://buy" stretch="none" horizontalAlignment="center"></Image>
  </StackLayout>
</Page>
它会中断页面。.操作栏未隐藏,并且内容和操作栏之间有巨大的空白。
我为我的应用程序使用angular2和打字稿。
我怎么了
任何帮助,不胜感激!
我在config.xml中有这个代码
<content src="index.html"/>
<access origin="*"/>
<allow-navigation href="tel:*" />
<allow-intent href="tel:*"/>
<allow-intent href="mailto:*"/>
<allow-intent href="http://*/*"/>
<allow-navigation href="tel:*"/>
<allow-navigation href="http://*/*"/>
<allow-navigation href="https://*/*"/>
<access origin="mailto:*" launch-external="true" />
<access origin="tel:*" launch-external="true" />
这在HTML中:
<a ng-href="tel:{{item.phone}}"><h3>Anrufen</h3></a>
item.phone返回0331234567
在index.html中:
<meta name="format-detection" content="telephone=yes">
我的错是什么?
容器只有屏幕高度的3/4左右,这与子元素的高度不同.
这是为什么?
我试图给容器和身体一个,min-height: 100%但这不起作用.即使!important
我不使用bootstrap,只是简单的html和CSS.
任何帮助非常感谢!
编辑:更改正文或html高度不起作用.这打破了页面.
我有一个带有以下CSS的正文:
body {
  background-image: url("../img/1.png");
  background-repeat: repeat;
  background-size: cover;
  font-family: "Raleway", sans-serif;
  font-size: 20px;
  font-weight: 300;
}
容器有这个CSS规则:
.container {
  width: 900px !important;
  margin: auto;
  padding-left: 20px;
  padding-right: 20px;
  background-color: rgba(255, 255, 255, 0.3);
  height: 100% !important;
}
我的标记看起来像这样:
  <body>
    <div class="container">
      <div class="header">
        <div class="lang">
          <ul class="languages">
            <li>DE</li>
            <li>FR</li>
          </ul>
        </div>
        <img src="img/header/royalpool.png" alt="" class="logo-royal"/>
        <img src="img/header/bluetech.png" alt="" class="logo-bluetech"/>
        <div class="lang">
          <ul class="languages">
            <li>Kontakt</li>
            <li>Downloads</li>
            <li>Händler</li>
          </ul>
        </div>
        <ul …所以我发现这个npm包:https://www.npmjs.com/package/nativescript-statusbar
但我无法使用Page元素,因为我使用的是angular和typescript.
我已经做到了这个:
this.page.backgroundSpanUnderStatusBar= true; 
但我的背景颜色是黑色.
我需要来自iOS的光状态栏.
这可能吗?
任何帮助非常感谢!
我坚持这个...我的目标是这个页面:
我想在图像上放置文本,例如"STALDEN".我知道如何做到这一点,但是当我使用绝对定位并插入新条目时,文本与之前的文本位于同一位置.我该如何更好地解决这个问题?
任何帮助非常感谢!
这就是我所拥有的:
<div class="karte">
      <img src="img/home/stalden.png" alt="">
      <h1>STALDEN</h1>
    </div>
CSS
.karte img {
  width: 100vw;
}
.karte h1 {
  position: absolute;
  top: 50px;
  left: 50px;
  color: white;
  font-family: "Teko", sans-serif;
  font-size: 15vw;
}