小编Bha*_*han的帖子

为什么无法在Yii2中验证您的数据提交错误?

在此输入图像描述

错误:

无法验证您的数据提交错误

在Yii2中创建一个公共函数.但是,在此方法中提交数据不接受,请参阅以下错误图像.为什么会这样?

yii2

33
推荐指数
4
解决办法
5万
查看次数

我需要角度2的多项旋转木马

我在angular2找到了Carousel.但是,我没有在angular2中获得多项旋转木马.

我需要多项旋转木马滑动支持可拖动角度2. 不使用Jquery.

我为我需要的Carousel添加了一个屏幕截图.

在此输入图像描述

carousel angular

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

在Angular 2+中ApplicationRef的目的是什么?

我不明白这个ApplicationRef课程及其用途.拥有" 对页面上运行的Angular应用程序的引用 "是什么意思?什么时候需要?

请提供一个小例子ApplicationRef.

angular

5
推荐指数
2
解决办法
6644
查看次数

如何使用 Yii2 ActiveDataProvider 设置当前页面?

如何在上述方法中使用 Yii2 ActiveDataProvider Yii 1.1 设置当前页面:

'pagination'=>array(
  'pageSize'=>2,
  'currentPage'=>1,
),
Run Code Online (Sandbox Code Playgroud)

yii2

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

Angular2 中的“{}”类型不存在属性

我已经使用 http 调用获取数据。但是,我在编译时显示了上述错误。

用户组件.ts

this._user.saveUsers(model).then(data => {
    if(data.success==true){
        this.router.navigate(['/user/list']);
    }else{
        console.log("data")
    }
});
Run Code Online (Sandbox Code Playgroud)

注意:我的对象是动态的。取决于我的 http 调用

错误:

app/users/users.component.ts(33,21):错误 TS2339:类型“{}”上不存在属性“成功”。app/users/users.component.ts(34,38):错误 TS2339:类型“{}”上不存在属性“数据”。app/users/users.component.ts(76,25): 错误 TS2339: 类型 '{}' 上不存在属性 'success'。

typescript angular

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

如何在angular 2中的多个模块中使用指令

我在两个模块中声明指令,然后返回错误为,Type PermissionDirective is part of the declarations of 2 modules而我仅声明一个模块,然后返回错误为Can't bind to 'isPermission' since it isn't a known property of 'button'。这里有什么问题。

请了解我的应用程序结构。

权限指令

import { Directive, Input } from '@angular/core';
import { TemplateRef, ViewContainerRef } from '@angular/core';
import { LoginInfoService } from '../service/auth.service';

@Directive({ selector: '[isPermission]' })
export class PermissionDirective {
  constructor(
    private templateRef: TemplateRef<any>,
    private viewContainer: ViewContainerRef,
    private _auth: LoginInfoService
  ) {
  }
  @Input() set isPermission(_module_action: Array<string>) {
    let permission = this._auth.isPermission(_module_action[0], _module_action[1]);
    if (permission) …
Run Code Online (Sandbox Code Playgroud)

javascript module typescript ecmascript-6 angular

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

如何工作angular2-indexeddb?

我已经学习了angular2-indexeddb服务.但是,不了解indexeddb的一些观点.

  1. 什么是indexeddb?
  2. 如何存储数据?
  3. 支持此服务的所有浏览器?
  4. 如何使用这项服务?

请解释此服务的更多详细信息.

indexeddb angularjs angular

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

如何以角度模板驱动形式使用垫自动选择设置过滤器

如何以角度模板驱动形式使用垫自动选择来设置过滤器。

<mat-form-field class="pl">
    <input matInput name="item_id" 
    [(ngModel)]="stock.item_id" 
    #item_id="ngModel" 
    placeholder="Item"           
    [matAutocomplete]="auto" required>
    <mat-autocomplete #auto="matAutocomplete" [displayWith]="valueMapper">
        <mat-option *ngFor="let item of itemsData" [value]="item.id">
        {{item.text}}
        </mat-option>
    </mat-autocomplete>
</mat-form-field>
Run Code Online (Sandbox Code Playgroud)

请参阅 stackblitz 示例:单击此处

angular mat-autocomplete angular8

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