我在我的html文件中使用此svg标记.它在Chrome中完美运行,但在Safari中,图标不会出现
<svg width="25" height="23" viewBox="0 0 25 23">
<use href="./icons.svg#helemet"></use>
</svg>
Run Code Online (Sandbox Code Playgroud)
谁知道为什么?
我想在查询表时使用正则表达式.我尝试使用它KeyConditionExpression,但它无效.有没有办法用DynamoDB做到这一点?
例如,我的主键是一个字符串,我想获得所有以a开头的项目A.该KeyConditionExpression表达式将看起来像"someKey = /^A/"
我正在订阅组件构造函数中的store属性
constructor(private someService: SomeService){
someService.someObservable.subscribe((data: Some)=> {
this.some = data;
console.log('changed');
});
}
Run Code Online (Sandbox Code Playgroud)
在服务中,构造函数如下所示:
constructor(private store: Store<any>){
this.someObservable = <Observable<{}>>store.select('some');
}
Run Code Online (Sandbox Code Playgroud)
我一直在改变这个对象的状态,但是日志只出现一次.还有一点奇怪的是,我正在this.some我的模板中直接访问该属性(没有async管道),它完全更新!看起来该this.some属性正在更新,但next()订阅中的功能不起作用.
帮助任何人?谢谢!
我有一个REST API API gateway和Lambda.我wan't为上传资料图片,那将文件传递到创建一个端点Lambda的功能,它是被调整,它注册到数据库并返回新图片的URL路径.
这些服务有什么办法吗?无法在线找到任何内容(我发现的唯一建议是直接上传到S3,这需要IAM权限,并且有一个事件触发Lambda函数来调整图片大小).
谢谢
UPDATE
AWS更新了APIGATEWAY并知道您可以通过端点发送二进制文件
感谢@blue和@Manzo对其进行评论
我正在使用webpack来编译我的sass文件.我有一个font-face看起来像这样:
@font-face
font-family: "Alef"
src: url("..\..\public\fonts\Alef\Alef-Webfont\Alef-Bold.eot")
src: url("..\..\public\fonts\Alef\Alef-Webfont\Alef-Bold.eot?#iefix") format("embedded-opentype"), url("..\..\public\fonts\Alef\Alef-Webfont\Alef-Bold.woff") format("woff"), url("..\..\public\fonts\Alef\Alef-Webfont\Alef-Bold.ttf") format("truetype"), url("..\..\public\fonts\Alef\Alef-Webfont\Alef-Bold.svg#alefbold") format("svg")
font-weight: bold
font-style: normal
Run Code Online (Sandbox Code Playgroud)
这就是我的webpack配置文件中的加载器的样子
{
test: /\.html$/,
loader: 'html'
},
{
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)(\?[a-z0-9=&.]+)?$/,
loader: 'file?name=assets/[name].[hash].[ext]'
},
{
test: /\.sass$/,
exclude: /node_modules/,
loader: 'raw-loader!sass-loader'
},
{
test: /\.css$/,
exclude: helpers.root('src', 'app'),
loader: ExtractTextPlugin.extract('style', 'css?sourceMap')
},
{
test: /\.css$/,
include: helpers.root('src', 'app'),
loader: 'raw'
}
Run Code Online (Sandbox Code Playgroud)
但是,我在ttf和woff上得到404,所以这个字体只出现在chrome中(不会出现在firefox和edge中)
谢谢!
我不想html在每个*ngSwitchCase块中编写代码,而是想添加对 a 的引用ng-template
(来自 angular docs):
<div *ngIf="show; then thenBlock; else elseBlock">this is ignored</div>
<ng-template #primaryBlock>Primary text to show</ng-template>
Run Code Online (Sandbox Code Playgroud)
想要这样做:
<div [ngSwitch]="switchVar">
<div *ngSwitchCase="1; then myTemplate"></div>
<div *ngSwitchDefault>output2</div>
</div>
<ng-template #myTemplate>HTML TEXT</ng-template>
Run Code Online (Sandbox Code Playgroud)
而不是这个:
<div [ngSwitch]="switchVar">
<div *ngSwitchCase="1">HTML TEXT</div>
<div *ngSwitchDefault>output2</div>
</div>
Run Code Online (Sandbox Code Playgroud)