Skip to content

A simple package that help enforces template's parent template.

License

Notifications You must be signed in to change notification settings

meteoric124/template-assert-parent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

template-assert-parent

A simple package that help enforces template's parent template.

Installation

meteor add meteoric124:template-assert-parent

To use:

Suppose you have two templates: foo and bar. And suppose you want bar to be parent of foo, then in foo's onRendered callback:

Template.foo.onRendered(function() {
  this.assertParent(Template.bar);
});

If foo is not under bar, then in your console screen:

Template.foo template must be under Template.bar

Caveats

This is all the use-case I need for the moment. That is, I don't care if it is an immediate child or grand* child. If you need to be able to specify levels, ask me, and I'll push something.

About

A simple package that help enforces template's parent template.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published