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

feat(navigationbar): add NavigationBar plugin #826

Merged
merged 6 commits into from
Jan 20, 2017
Merged

feat(navigationbar): add NavigationBar plugin #826

merged 6 commits into from
Jan 20, 2017

Conversation

jlucfarias
Copy link
Contributor

No description provided.

* @param callbacks {Object} Optional callbacks
*/
@Cordova()
static setUp(autohide?: boolean = false, callbacks?: {success?: Function, failure?: Function}): void { }
Copy link
Collaborator

@ihadeed ihadeed Nov 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should return a Promise.

The decorator should include the following options:

@Cordova({
  callbackStyle: 'object',
  successName: 'success',
  errorName: 'failure'
})

Then finally remove the callbacks parameter.

@ihadeed ihadeed modified the milestone: v2.4.0 Nov 29, 2016
@jlucfarias
Copy link
Contributor Author

Like this @ihadeed ?

successName: 'success',
errorName: 'failure'
})
static setUp(autohide?: boolean = false): void { }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be:
static setUp(autohide?: boolean = false): Promise<any> { return; }

/**
* Hide the navigation bar.
* @param autohide {boolean}
* @param callbacks {Object} Optional callbacks
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line and add:

@return {Promise<any>}

@jlucfarias
Copy link
Contributor Author

@ihadeed

errorName: 'failure'
})
static setUp(autohide?: boolean = false): Promise<any> { return; }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't you missing hideNavigationBar definition?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Plugin({
name: 'NavigationBar',
plugin: 'cordova-plugin-navigationbar',
pluginRef: 'plugins.navigationbar',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it should be navigationbar instead

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right.. it is navigationbar

errorName: 'failure'
})
static setUp(autohide?: boolean = false): Promise<any> { return; }

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Plugin({
name: 'NavigationBar',
plugin: 'cordova-plugin-navigationbar',
pluginRef: 'plugins.navigationbar',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right.. it is navigationbar

@ihadeed ihadeed merged commit 70c15c3 into danielsogl:master Jan 20, 2017
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.

3 participants