untilDestroy icon indicating copy to clipboard operation
untilDestroy copied to clipboard

do we need an npm module for this?

Open SanderElias opened this issue 7 years ago • 6 comments

I'm doubting if there is a need to build an NPM module for what is essentially 1 file.

If you are interested in this, please vote in this issue.

SanderElias avatar Dec 18 '17 04:12 SanderElias

Amazing idea! Why not a PR in Angular?

cyrilletuzi avatar Dec 18 '17 18:12 cyrilletuzi

For now, I'm pretty sure this is something the core team feels this is more of a userland solution.
And also, this is completely unneeded if you go full observables and utilize the async pipe.

SanderElias avatar Dec 18 '17 18:12 SanderElias

Most npm modules are essentially 1 file, this is usefull so please put it on npm :)

niklas-dahl avatar Dec 20 '17 08:12 niklas-dahl

@SanderElias @cyrilletuzi I was thinking this could be part of Angular. Can the component decorator be enhanced to do:

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css'],
  unsubscribeOnDestroy: true
})

OR

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css'],
  onDestroyBehaviors: [UtilDestroy]
})

dereklin avatar Dec 21 '17 19:12 dereklin

@SanderElias Amazing clean code, I love it! please do an npm pkg so I can start using already :)

Carniatto avatar Sep 06 '19 10:09 Carniatto

Ok, I will add it as an NPM package to my sample repo.

SanderElias avatar Sep 10 '19 09:09 SanderElias