小编Asa*_*sad的帖子

ngx-bootstrap和ng2 bootstrap之间的区别?

我正在使用bootstrap(UI)和angular 2制作项目.我对这两件事情都很陌生我的朋友建议我使用ng2 bootstrap我在ngx bootstrap和ng2 bootstrap之间非常困惑.总是当我搜索2个bootstrap时,它会带我到ngx bootstrap.两者有什么区别?

ng2-bootstrap ngx-bootstrap angular

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

模块AppRegistry未注册可调用模块(调用runApplication)

我正在使用原生基础在反应原生中制作应用程序.我对这两件事都不熟悉.当我运行应用程序它给了我这个错误:

在此输入图像描述

这是我的代码:

export default class Point extends Component {

    render() {
        return (
            <Container>
                <Header>
                    <Left>
                        <Button transparent>
                            <Icon name='menu' />
                        </Button>
                    </Left>
                    <Body>
                        <Title>Header</Title>
                    </Body>
                    <Right />
                </Header>
            </Container>
        );
    }
}
Run Code Online (Sandbox Code Playgroud)

这是我的版本的截图

在此输入图像描述

和nativebase版本是 "native-base": "^2.1.2"

react-native native-base

35
推荐指数
6
解决办法
6万
查看次数

权限不足:通过管理员登录时,请求在 google 目录 API 中的身份验证范围不足

我正在使用 google 管理目录 API 使用以下 API https://www.googleapis.com/admin/directory/v1/users获取所有帐户公共信息

当我使用g suite域帐户 登录时,这里是此 api链接的链接,假设 abc@somedomain.com 使用非管理用户,此 api 工作正常并获取数组中所有帐户的数据,但是当我通过登录调用此 API 时管理员它给了我以下错误/


权限不足:请求的身份验证范围不足


为什么会发生这种情况我对两个用户使用相同的身份验证和 API 密钥
我的代码在这里

const token =localStorage.getItem('token')
 fetch(`https://www.googleapis.com/admin/directory/v1/users? 
 domain=${domain.url}&viewType=domain_public&key=${apiKey.key}`  
  ,{ headers: {
'authorization': 'Bearer '+token
  },})

  .then(response => response.json())
  .then(data => this.setState({ users:data.users }));
Run Code Online (Sandbox Code Playgroud)

令牌来自此模块npm React google 登录google 登录按钮

google-admin-sdk reactjs google-directory-api

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

React: Invalid value for prop `savehere` on &lt;div&gt; tag. Either remove it from the element, or pass a string or number value to keep it in the DOM

I'm calling a parent method from child component using props and I'm getting this error: 在此处输入图片说明

The way I'm passing props to the AddGuest child component is like this:

import React from 'react';
 import globalService from '../services/globalService';

   import '../styles/chairqueue.css';
   import {buttonText,endPoint} from '../constants/global.constants';
   import Modal from 'react-bootstrap/Modal'
   import ModalDialog from 'react-bootstrap/ModalDialog'
import ModalHeader from 'react-bootstrap/ModalHeader'
import ModalTitle from 'react-bootstrap/ModalTitle'
import ModalBody from 'react-bootstrap/ModalBody'
import ModalFooter from 'react-bootstrap/ModalFooter'
import Button from 'react-bootstrap/Button'
import  { useState, useEffect } from 'react';
import DatePicker from …
Run Code Online (Sandbox Code Playgroud)

javascript frontend bootstrap-modal reactjs react-bootstrap

7
推荐指数
2
解决办法
9381
查看次数

反应本机RTL中特定文本的从右到左

我正在反应本地开发阿拉伯语的应用程序,我已经使用了本地的标签和菜单。我已经正确对齐,因为只有一个单词。但是现在我必须写从右到左对齐的句子。有没有办法为特定的文本设置RTL格式,因为当我设置I18nManager.forceRTL(true);它时,整个应用程序都更改了它,并且我以前的工作全部毁了并且选项卡无法正常工作。请帮忙 。

right-to-left react-native native-base

6
推荐指数
1
解决办法
6858
查看次数

无法在Object处读取null的属性'$$ phase'.$$ debounceViewValueCommit

我从一个页面移动到另一个页面时收到此错误.如果我直接添加订单页面,我已经添加了订单页面,但是如果我去订单列表页面然后去添加订单页面,那么我收到了这个错误,并且我自动触摸了添加订单页面集的所有表单字段.可能有什么问题请帮忙.提前致谢错误

这是我的home.html代码

<div class="container body" ng-cloak>
<div class="main_container">
    <div class="col-md-3 left_col">
        <div class="left_col scroll-view">
            <div class="navbar nav_title" style="border: 0;">
                <img src="../assets/images/logo1.PNG" style="width:25%; float:left;"/>
                <a href="index.html" class="site_title" style="float: left;width: 117px;margin-top: 5px;text-transform: uppercase;font-size: 17px;"><span>Trackerist</span></a>
            </div>

            <div class="clearfix"></div>

            <!-- menu profile quick info -->
            <div class="profile clearfix padding-2x">
                <h5 class="text-center">Welcome</h5>
                <h5 class="text-center">{{domain | capitalize}}</h5>
            </div>
            <!-- /menu profile quick info -->

            <!-- sidebar menu -->
            <div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
                <div class="menu_section">
                    <!-- <h3>General</h3> -->
                    <ul class="nav side-menu">
                        <li><a href="index.html"><i class="fa fa-dashboard"></i> DASHBOARD …
Run Code Online (Sandbox Code Playgroud)

angularjs angular-ui-router

6
推荐指数
0
解决办法
469
查看次数

一对一和组聊天nodejs Socket.io的更好方法

我正在在NodeJs的应用程序中使用socket.io和客户端的angular 4 进行一对一的聊天。我是socket.io和angular 4的新手,我想问问对此有什么更好的方法,例如,用户是要向特定用户发送消息还是要向一组用户发送消息。

根据我的报告,我应该保留所有已连接用户的obj,并且该obj包含该用户的套接字ID及其用户名(email或whatever),以便如果某个用户想要向某人发送消息,则我们需要该用户名称,我们可以通过他的用户名访问他的ID。还是有什么解决办法呢?我应该在哪里保留用户和套接字ID 全局变量或数据库的 obj ?

chat node.js socket.io angular

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

React-native 路由(单页应用程序)

我对反应本机路由非常困惑。我是react-native的新手,从来没有研究过React.js。我想问一下,react本机应用程序是像angularJs一样的单页应用程序架构吗?在react-native中有很多路由和导航的方法,比如

1 .react-native-router-flux

2.导航器
等多种方式。有人请告诉我这个 SPA 架构是什么,以及在有更多支持的 React-Native 中路由的最佳方式是什么。我想在我的应用程序中制作侧抽屉菜单和选项卡菜单。请帮我 。提前致谢

single-page-application react-native react-router-redux react-navigation

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

为什么 fetch api 在 url %E2%80%8B 中添加转义字符

当我提供静态字符串来获取它时,我在反应服务中调用 fetch api 工作正常,如下所示

export const getAll = async (_url) => {
 const requestOptions = {
method: 'GET',
};

 try {
  const response = await fetch(
  process.env.REACT_APP_API_URL + '/api/communications/notifications/',  // like this
  requestOptions
);
    const json = await response.json();
return json;
} catch (error) {
return Promise.reject(error);
}
};
Run Code Online (Sandbox Code Playgroud)

url 形成 => http://localhost/api/communications/notifications/

但是当我将字符串从 action 传递给 service 并使用该参数(_url)时,它会像这样自动添加转义字符

url 形成 => http://localhost/api/communications%E2%80%8B/notifications%E2%80%8B/

这是我的操作文件代码

import { notificationConstants } from '../constants/header.constants';
import * as ajaxService from '../services/ajax.service';
import { toast } from …
Run Code Online (Sandbox Code Playgroud)

url fetch reactjs react-redux

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