Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

$mdUtil: Make debounce function public #6874

Open
epelc opened this issue Jan 27, 2016 · 1 comment
Open

$mdUtil: Make debounce function public #6874

epelc opened this issue Jan 27, 2016 · 1 comment
Assignees
Milestone

Comments

@epelc
Copy link
Contributor

epelc commented Jan 27, 2016

The $mdUtil.debounce function is very convenient. It'd be very nice if it was made public and added to the docs. It's easy to use and is a nice way to stop you from doing something too often.

You can easily use it now as follows.
$mdUtil.debounce(function() { // do something }, 300)

But it would be nice if changes to it would be documented in the changelog and if the docs for it were available on the docs site.

See the source for more info about the debounce function.
https://github.com/angular/material/blob/master/src/core/util/util.js#L419

@ThomasBurleson Is there any policy for making more utility type things like this public? A similar thing which was made public/documented is $mdSticky.

@ThomasBurleson
Copy link
Contributor

The $mdUtil was originally intended for internal use but nothing prevents us from documenting it for public consumption. Similarly with $mdSticky.

Provide a Pull Request and we will merge it with the docs! Thx @epelc

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants