me9*_*867 10 javascript ionic2 angular
建立在一些优秀的标准Ionic 2掠夺者的基础上http://plnkr.co/edit/ZsoPeE?p=preview和 http://plnkr.co/edit/WBeRRJyYucLwvckjh5W7?p=preview
你能帮我调整我的Master/Detail Plunker吗?我以为我已经把所有部件都放在了一边,但因为它产生了白色屏幕而丢失了一些东西.
这是我对Master/Detail插件的尝试 http://plnkr.co/edit/7NHIYMA3TUdd5nOkoXyF?p=preview
import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { AppComponent } from './app.component';
import { HomePage } from '../pages/home/home';
import { MasterPage } from '../pages/master/master';
import { DetailPage } from '../pages/detail/detail';
import { Sheetsu } from '../providers/sheetsu';
@NgModule({
imports: [ IonicModule.forRoot(AppComponent) ],
declarations: [ AppComponent, HomePage, MasterPage, DetailPage],
entryComponents: [ HomePage, MasterPage, DetailPage ],
bootstrap: [ IonicApp ],
providers: [ Sheetsu ]
})
export class AppModule { }
Run Code Online (Sandbox Code Playgroud)
固定插头:http://plnkr.co/edit/5V36C9QHYDGBIqSIfBUl ?p=preview
你有几个错误
1) import { Sheetsu } from '../providers/sheetsu';<- 你的文件名为Sheetsu,大写的 S
2)您的相对路径是错误的,您通过放入配置而使自己变得复杂pages: 'pages',,例如:
import { MasterPage } from '../pages/master/master';
里面HomePage应该是
import { MasterPage } from '../master/master';
3) 您正在使用"module": "commonjs",但没有利用相对 html url:
templateUrl: 'pages/master/master.html', -> `templateUrl: './master.html',`
Run Code Online (Sandbox Code Playgroud)
与moduleId: module.id你里面的@Component
4) 你的按钮点击return this.http.get('../assets/sheetsu.json')应该是return this.http.get('./assets/sheetsu.json')
| 归档时间: |
|
| 查看次数: |
457 次 |
| 最近记录: |