Jump to content

Hey, I cannot figure out this error, can anyone help?

Error: Can't resolve all parameters for HomePage: ([object Object], ?).

 

With the code;

import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { AddNotePage } from '../add-note/add-note';
import { NoteService } from '../../providers/note-service/note-service';

@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {
  notes: { title: string }[] = [];

  constructor(public navCtrl: NavController, private noteService: noteService) {
  }

  ionViewWillEnter() {
    this.notes = this.getAllNotes
  }

  addNote(){
    this.navCtrl.push(AddNotePage);
  }

  getAllNotes(){
    return this.noteService.getAllNotes();
  }
}

Thanks,

 

Hariboe

Link to comment
https://linustechtips.com/topic/947308-typescript-help/
Share on other sites

Link to post
Share on other sites

41 minutes ago, Hariboe said:

Nevermind I fixed it, sorry for the bother :D

Post your solution so other people can find an answer

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
https://linustechtips.com/topic/947308-typescript-help/#findComment-11530997
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×