Coder Social home page Coder Social logo

ionic-shrinkage's People

Contributors

patrickmcd avatar whatsthatitspat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

wassy92x pipozoft

ionic-shrinkage's Issues

Update ?

you said you would update this when ionic 2.0.0 is released.
It was released.
I would appreciate when you would update this.

Updated needed and error on @ViewChild

In testing this out in my own app, I found some errors that I was able to correct and one I couldn't.

With Ionic 2.1.0-beta.3, the following changes had to be made:

import { Component, Directive, ViewChild } from '@angular/core';
//import { Shrinkage } from 'ionic-shrinkage';
import * as Shrinkage from 'ionic-shrinkage';

@component({
selector: 'page-home',
templateUrl: 'home.html'
//directives: [ Shrinkage ]
})

@directive({
selector: '[Shrinkage]' // <-- [my-dir] because it's an attribute
})

The only error left is this:

11:09:48] typescript: C:/Users/Thomas/ionic2/app/src/pages/home/home.ts, line: 24

        Argument of type 'typeof "C:/Users/Thomas/ionic2/app/node_modules/ionic-shrinkage/dist/index"'
        is not assignable to parameter of type 'string | Function | Type<any>'. Type 'typeof "C:/Users/Thomas/ionic2/app/node_modules/ionic-shrinkage/dist/index"'
        is not assignable to type 'Type<any>'. Property 'apply' is missing in type 'typeof "C:/Users/Thomas/ionic2/app/node_modules/ionic-shrinkage/dist/index"'.
  L23:  // Necessary for the change() method below
  L24:  @ViewChild(Shrinkage) shrinkage;

[11:09:48] transpile failed

export class HomePage {
  conferenceDate = '2047-05-17';

  // We bind content to the shrinkage attribute in the HTML template
  @ViewChild(Content) content: Content;

  // Necessary for the change() method below
  **@ViewChild(Shrinkage) shrinkage;**// <-- line 24

  constructor(public popoverCtrl: PopoverController) { }

  presentPopover(event) {
    let popover = this.popoverCtrl.create(PopoverPage);
    popover.present({ ev: event });
  }

  // If you use Structural Directives to add or remove items in the header,
  // you'll have to call resize() on both content and the shrinkage directive.
  change(e) {
    this.content.resize();
    this.shrinkage.resize();
  }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.