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

Extending ion-button

$
0
0

@HugoHeneault wrote:

I'd like to extend ion-button component to add some methods on a custom component of my own. So I did:

import {Component, ElementRef, Renderer} from '@angular/core';
import {Button, Config} from "ionic-angular";

@Component({
  selector: '[search-button]',
  templateUrl: 'search-button.component.html',
})
export class SearchButtonComponent extends Button {
  constructor(ionButton: string, config: Config, elementRef: ElementRef, renderer: Renderer) {
    super(ionButton, config, elementRef, renderer);
  }
}

But this is giving me a ERROR Error: Uncaught (in promise): Error: No provider for String! error.

What's the good way of extending ionic components?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70904

Trending Articles



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