diff --git a/docs/content/error/$compile/reqslot.ngdoc b/docs/content/error/$compile/reqslot.ngdoc new file mode 100644 index 000000000000..f3de08bf3f24 --- /dev/null +++ b/docs/content/error/$compile/reqslot.ngdoc @@ -0,0 +1,47 @@ +@ngdoc error +@name $compile:reqslot +@fullName Required transclusion slot +@description + +This error occurs when a directive or component try to transclude a slot that is not provided. + +Transcluded elements must contain something. This error could happen when you try to transclude a self closing tag element. +Also you can make a transclusion slot optional with a `?` prefix. + +```js +// In this example the must have an inside to transclude it. +// If not, a reqslot error will be generated. + +var componentConfig = { + template: 'path/to/template.html', + tranclude: { + importantSlot: 'importantComponent', // mandatory transclusion + optionalSlot: '?optionalComponent', // optional transclusion + } +}; + +angular + .module('doc') + .component('myComponent', componentConfig) + +``` + +```html + + + + + + + + + + + + + + + + + +```