Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for module importing and latest Ionic version #34

Open
wants to merge 8 commits into
base: 2.0
Choose a base branch
from

Conversation

m-spyratos
Copy link

Module Updates:

  • Updated module's typescript build. Fixes relative path includes.
  • Converted "scroll-content" style, to ".scroll-content", for latest ionic. Fixes pull-up content not scrolling to the end.
  • Updated demo with latest Ionic version.

Github Page Updates:

We need to update the Github page with the following:

Import Styles

Import ion-pullup.scss into your app's main scss file.

@import "../../node_modules/ionic-pullup/src/ion-pullup.scss";

Inject directive in your app's module

import {IonPullUpComponent, IonPullUpTabComponent} from 'ionic-pullup';

@NgModule({
  declarations: [
    MyApp,
    HomePage,
    IonPullUpComponent,
    IonPullUpTabComponent
  ],
  imports: [
    IonicModule.forRoot(MyApp)
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    HomePage
  ],
  providers: [{provide: ErrorHandler, useClass: IonicErrorHandler}]
})

Include pull-up in your page

Import ion-pullup.ts in your TypeScript code.

import {IonPullUpFooterState} from 'ionic-pullup';

@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {

  footerState: IonPullUpFooterState;

  constructor(public navCtrl: NavController) {
    this.footerState = IonPullUpFooterState.Collapsed;
  }

  footerExpanded() {
    console.log('Footer expanded!');
  }

  footerCollapsed() {
    console.log('Footer collapsed!');
  }

  toggleFooter() {
    this.footerState = this.footerState == IonPullUpFooterState.Collapsed ? IonPullUpFooterState.Expanded : IonPullUpFooterState.Collapsed;
  }

}

(HTML is the same)

@m-spyratos m-spyratos mentioned this pull request Jan 31, 2017
@m-spyratos m-spyratos changed the title 2.0 Fixes for module importing and latest Ionic version Jan 31, 2017
@m-spyratos
Copy link
Author

@arielfaur, Please let me know if you have any questions or concerns about this pull request.

Currently in the repo I have uploaded the compiled files along with the source typescript files. This is not ideal and you might want to consider a building/publishing process for your plugin. For convenience, I have included two npm scripts:

npm run build
npm run release

The first one will install the node_modules and compile the typescript files, generating the corresponding javascript and map files, and the second one will do the same as the build script, plus will publish to the npm.

Fixed non legal calc with zero value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant