小编Mus*_*SAL的帖子

Ionic 4 存储问题:没有存储提供程序

我尝试在我的离子项目中导入存储模块。但是当我添加提供者存储时,错误发生了变化。错误变为“无法解决所有存储:(?)”我该如何解决此错误?你能帮我吗?我在下面写了我的代码。我看这个视频:https : //www.youtube.com/watch?v=h_IhS8QQjUA&list=PLNFwX8PVq5q7S-p_7zO99xdauhDsnMPw0&index=17&t=0s

应用模块 ts:

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouteReuseStrategy } from '@angular/router';

import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';
import {Storage} from '@ionic/storage';

import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { IonicStorageModule  } from '@ionic/storage';
@NgModule({
  declarations: [AppComponent],
  entryComponents: [],
  imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule,IonicStorageModule.forRoot()],
  providers: [
    StatusBar,
    SplashScreen,
    { provide: …
Run Code Online (Sandbox Code Playgroud)

ionic-framework ionic4 angular7

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

数据表警告:无法重新初始化数据表

我的 JS 代码:\n

\n\n
function filtre() {\n    var status = document.getElementById("filtre").value;\n    $.get("users/liste/" + status, function (data) {\n        $("#example2_wrapper").DataTable({\n            "processing": true,\n            "serverSide": true,\n            "ajax": "../admin/users/liste/" + status,\n            "aoColumns": [\n                {mData: "id"},\n                {mData: "name"},\n                {mData: "user_level"},\n                {mData: "location"},\n                {mData: "gender"},\n                {mData: "status"},\n                {mData: "islem"}\n            ]\n        });\n    });\n}\n
Run Code Online (Sandbox Code Playgroud)\n\n

\xc4\xb0 无法用我的数据填充数据包。它的类型是 JSON,这是数据表的需要。错误是

\n\n
\n

DataTables 警告:表 id=example2_wrapper - 无法重新初始化 DataTable

\n
\n

javascript datatable

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

Angular 5 错误:无法绑定到“ngForFor”,因为它不是“li”的已知属性

我的 category.component.ts 是 category.component.ts

import { Component, OnInit } from '@angular/core';
import { CategoryService } from './category.service';
import { Category } from './category';
@Component({
selector: 'app-category',
templateUrl: './category.component.html',
styleUrls: ['./category.component.css'],
providers: [CategoryService]
})
export class CategoryComponent implements OnInit {
title = 'Category';
categories: Category[];
constructor(private categoryService: CategoryService) {}
ngOnInit() {
this.getCategories();
}
getCategories() {
this.categoryService.getCategories().subscribe(res => {
  this.categories = res;
});
}
}
Run Code Online (Sandbox Code Playgroud)

我的 category.component.html 是 category.component.html

<h3>{{title}}</h3>
<ul>
<li *ngFor='let item2 for categories'>
  {{item2.CategoryName}}
</li>
</ul>
Run Code Online (Sandbox Code Playgroud)

我的 category.service.ts 是 …

javascript typescript angular

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