Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix(ngTranslude): detect ngTranslude usage without a translusion directive #4162

Closed
wants to merge 1 commit into from

Conversation

jankuca
Copy link
Contributor

@jankuca jankuca commented Sep 25, 2013

Closes #3759

@mary-poppins
Copy link

Thanks for the PR!

  • Contributor signed CLA now or in the past
    • If you just signed, leave a comment here with your real name
  • PR's commit messages follow the commit message format

If you need to make changes to your pull request, you can update the commit with git commit --amend.
Then, update the pull request with git push -f.

Thanks again for your help!

@@ -53,6 +53,10 @@
*/
var ngTranscludeDirective = ngDirective({
controller: ['$transclude', function($transclude) {
if (!$transclude) {
throw new Error('Cannot use ng-translude without a translusion directive');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be a minErr

@IgorMinar
Copy link
Contributor

also it should be marked as "fix" not "chore". (chores don't show up in release notes)

@@ -1,5 +1,7 @@
'use strict';

var $ngTranscludeMinErr = minErr('ngTransclude');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since you need only one error with this namespace, the convention is to inline the minErr call

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That does not seem to be a good convention IMO but sure.

@IgorMinar
Copy link
Contributor

otherwise this looks good to me

@btford
Copy link
Contributor

btford commented Sep 30, 2013

looks good to me

@ghost ghost assigned btford Sep 30, 2013
@btford
Copy link
Contributor

btford commented Sep 30, 2013

Actually it needs a spot in the message to interpolate the starting element.

It also needs an error page for the docs. I'll fix it.

@btford
Copy link
Contributor

btford commented Oct 1, 2013

Landed as 5a1a6b8 ultimately.

@btford btford closed this Oct 1, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better error message with transclude / ng-transclude
4 participants