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

Custom Breakpoints #2

Open
KenPixelMii opened this issue May 6, 2015 · 4 comments
Open

Custom Breakpoints #2

KenPixelMii opened this issue May 6, 2015 · 4 comments

Comments

@KenPixelMii
Copy link

Hi,
Firstly, thank you for providing this, it works great! This really isn't an "issue", more of my not being familiar with using plugins with AngularJS. When using angular-footable how would I specify custom breakpoints within the directive?

example:
breakpoints: {medium: 1160}

Thanks in advance.

Ken

@ziscloud
Copy link
Owner

Hi @KenPixelMii

Thanks for your advice, that is a good feature, but customize the breakpoints name is not supported by the footable itself, users only can customize the width of the breakpoints, please refer to the example page.

@KenPixelMii
Copy link
Author

Hi,

Actually with FooTable you can create your own breakpoint names, see the getting started demo/docs http://fooplugins.com/footable-demos/
This code is from the docs:
$('.footable').footable({
breakpoints: {
tiny: 100,
medium: 555,
big: 2048
}
});

I have implemented this and it works fine but I have to put it in all of my Angular templates where I have tables. Is there a way I can set this in a directive?

I appreciate your help.

Ken

@mattjames-counterpart
Copy link

@KenPixelMii - Have you had any luck with this? I dug in to the js a little bit, and thought that I could use table-opts="ngObject", but that hasn't seemed to get it for me.

Any word from @ziscloud?

@itwasmattgregg
Copy link

itwasmattgregg commented Jul 28, 2016

@KenPixelMii @mattjameswdd - Not sure if this is right but I added this line to my app.js in module/app:

function applicationStartup($window) {
    $window.footable.options.breakpoints.tablet = 939;
}

Note: this will set the breakpoint for your app globally. You will have to do something different if you want to set it on a per page basis but this seems to be what everyone is asking.

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

No branches or pull requests

4 participants