有没有办法在模块配置后以编程方式将状态添加到$ stateProvider,例如服务?
要为这个问题添加更多上下文,我有一种情况可以采用两种方法:
国家定义
.state('index.resource.view', {
url: "/:resourceName/view?pageNumber&pageSize&orderBy&search",
templateUrl: "/resourceAdministration/views/view.html",
controller: "resourceViewCtrl",
reloadOnSearch: false,
})
Run Code Online (Sandbox Code Playgroud)
我的webpack.config.js文件如下:
var path = require('path');
var webpack = require('webpack');
var CommonsChunkPlugin = webpack.optimize.CommonsChunkPlugin;
var autoprefixer = require('autoprefixer');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var CopyWebpackPlugin = require('copy-webpack-plugin');
var ENV = process.env.npm_lifecycle_event;
var isTest = ENV === 'test' || ENV === 'test-watch';
var isProd = ENV === 'build';
module.exports = function makeWebpackConfig() {
var config = {};
if (isTest) {
config.devtool = 'inline-source-map';
} else if (isProd) {
config.devtool = 'source-map';
} else {
config.devtool = 'eval-source-map';
}
config.debug …Run Code Online (Sandbox Code Playgroud) 一个基本的CSS示例.我遇到的每个浏览器都会使用边距和填充以及红色边框渲染项目
.test{
margin: 4px;
border: 1px solid black;
padding: 4px;
}
.test{
border: 1px solid red;
}
Run Code Online (Sandbox Code Playgroud)
当然,如果我手工编写这个CSS,我会用红色替换黑色,只有一个规则.
但是,如果第一个规则来自父CSS文件(或者在我的情况下是LESS文件),我无法编辑,因为它在其他地方使用,或来自我不想破解的第三方库,那么我看到别无选择,只能添加额外的规则.
现在因为我使用服务器端LESS - > CSS编译缩小,对我来说似乎完全合理的是压缩器/缩小器应该将规则减少到仅仅
.test{
margin: 4px;
border: 1px solid red;
padding: 4px;
}
Run Code Online (Sandbox Code Playgroud)
但是我所尝试过的一切都遵守了这两条规则; 一些压缩器/缩小器甚至可以删除换行符
.test{margin:4px;border:1px solid black;padding:4px}.test{border:1px solid red}
Run Code Online (Sandbox Code Playgroud)
它删除了一个换行符,但留下了一个完全不必要的规则声明.这对我来说似乎很奇怪.
有什么系统可以做到这一点吗?(最好是node.js的附加组件)如果没有,我们知道为什么不呢?看起来像一个相当大的文件大小保存,没有任何缺点.
免责声明我试图寻找组合选择器,合并选择器和少数变体,如果我错过了这个程序的常用术语,请道歉,似乎很可能因为增益看起来很明显我不得不遗漏一些东西!
我无法找到使用图表订阅所有用户更改的方法,看起来它是不可能的.
所以我开始单独订阅每个人,理想情况下我希望最终来自日历,电子邮件和联系人的所有更新,但我开始使用日历.
代码与我的用户完美配合,但是当我尝试订阅所有人(大约300个用户)时,我达到了七个订阅的硬限制,因为进一步的请求失败并具有通用Bad Request状态.
在官方文档https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/webhooks中说:
限制某些限制适用,并且可能在超出时产生错误:
1)最大订阅配额
- 每个应用程序:总订阅50,000
- 每个租户:所有应用程序共有35个订阅
- 每个应用程序和租户组合:7个订阅总数
租户似乎是指一个实际的活动目录,因此我们限制为每个应用7个,或总共35个.
将用户分成域的多个活动目录是没有可能的,即使玩杂耍多个应用程序做同样的事情似乎很奇怪,这些限制对我来说毫无意义.
有没有办法增加这些微小的限制?
我订阅了users/$email/events所以我发帖到https://graph.microsoft.com/v1.0/subscriptions
{
"changeType": "created,updated,deleted",
"notificationUrl": "https://webhooks.mydomain.com/my/endpoint",
"resource": "users/$email/events",
"expirationDateTime":"2018-05-12T16:00:00.9356913Z",
"clientState": "my-super-secret-identifier"
}
Run Code Online (Sandbox Code Playgroud)
只要我想要<= 7个订阅,它就会很棒.我还订阅了root/users以查看是否会给我所有更改,这意味着我只能订阅6个单独的日历.
我正在使用官方的PHP库,但假设/希望无所谓.
在 Azure Dev Ops Pipelines 上构建中型 Angular 7 项目时遇到问题。所以我创建了一个最小的项目来重现这个问题。
使用 Angular CLI (7.2.4) 我创建了一个新项目
ng new minimal-app
Run Code Online (Sandbox Code Playgroud)
它在本地和 Azure 上构建都很好。我编辑了 app.component.ts 以使用我的 UserModel,第 2、11 和 14 行
import {Component} from '@angular/core';
import {UserModel} from '../Models/User.model';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'minimal-app';
user = new UserModel();
constructor() {
this.user.name = 'Jo';
}
}
Run Code Online (Sandbox Code Playgroud)
User.model.ts 文件包含
export class UserModel {
id: number;
name: string;
}
Run Code Online (Sandbox Code Playgroud)
这也可以在本地和 Azure 上编译得很好。尝试添加嵌套模型时出现问题,请参阅 Action.model.ts
export class ActionModel { …Run Code Online (Sandbox Code Playgroud) 我的项目突然出现这个错误:
Argument 1 passed to Vonage\Client::setHttpClient() must be an instance of Psr\Http\Client\ClientInterface, instance of GuzzleHttp\Client given, called in /home/vagrant/Code/xxx/vendor/nexmo/client-core/src/Client.php
Run Code Online (Sandbox Code Playgroud)
这是包中的一小部分代码:
if (is_null($client)) {
// Since the user did not pass a client, try and make a client
// using the Guzzle 6 adapter or Guzzle 7 (depending on availability)
/** @noinspection ClassConstantCanBeUsedInspection */
if (class_exists('\GuzzleHttp\Client')) {
$client = new \GuzzleHttp\Client();
} elseif (class_exists('\Http\Adapter\Guzzle6\Client')) {
/** @noinspection CallableParameterUseCaseInTypeContextInspection */
/** @noinspection PhpUndefinedNamespaceInspection */
/** @noinspection PhpUndefinedClassInspection */
$client = new \Http\Adapter\Guzzle6\Client(); …Run Code Online (Sandbox Code Playgroud) javascript ×2
php ×2
angular ×1
angularjs ×1
azure-devops ×1
composer-php ×1
css ×1
fullcalendar ×1
guzzlehttp ×1
laravel ×1
less ×1
minify ×1
webpack ×1