Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70434

Why i get runtime error when i run my script

$
0
0

@Sas123 wrote:

Hi I am new to ionic, I use get started video to edit my home.ts for basic list,but I get runtime error,please help.

import { Component } from ‘@angular/core’;
import { NavController } from ‘ionic-angular’;

@Component({
selector: ‘page-home’,
templateUrl: ‘home.html’
})
export class HomePage {
items: any[];

constructor(public navCtrl: NavController) {
this.items = [];
for(let 1 = 0; 1 < 10; 1++) {
this.items.push({ text: 'Item ’ + 1, id: 1});
}
}
itemSelected(item) {
alert(item.text);
}
}

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70434

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>