René's URL Explorer Experiment


Title: ng-transclude should not create new sibling scope. · Issue #5489 · angular/angular.js · GitHub

Open Graph Title: ng-transclude should not create new sibling scope. · Issue #5489 · angular/angular.js

X Title: ng-transclude should not create new sibling scope. · Issue #5489 · angular/angular.js

Description: This is more of a change request and I would like to see what other people think. In my humble opinion ng-transclude should not create it's own scope or at least have a way to prevent it from doing so. The reason behind this is that a di...

Open Graph Description: This is more of a change request and I would like to see what other people think. In my humble opinion ng-transclude should not create it's own scope or at least have a way to prevent it from doing...

X Description: This is more of a change request and I would like to see what other people think. In my humble opinion ng-transclude should not create it's own scope or at least have a way to prevent it from d...

Mail addresses
notifications@github.com

Opengraph URL: https://github.com/angular/angular.js/issues/5489

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ng-transclude should not create new sibling scope.","articleBody":"This is more of a change request and I would like to see what other people think.\n\nIn my humble opinion ng-transclude should not create it's own scope or at least have a way to prevent it from doing so. The reason behind this is that a directive which requests transclusion already has means to specify whether or not it wants to have a scope or an isolated scope or no scope at all. It uses ng-transclude directive to mark where it wants to insert the content. When ng-transclude creates it's own sibling scope it kind of breaks the expectations of the directive which defines what kind of scope it wants and there comes the manifestation of the popular 'value' vs 'object.value' confusion.\n\nHere's an example of where new scope doesn't make sense in my opinion:\n\n```\nui.directive('box', function() {\n    return {\n        restrict: 'E',\n        transclude: true,\n        template: '\u003cdiv ng-transclude/>',\n        replace: true,\n        scope: {}\n    };\n});\n```\n\nAll this directive wants is replace the `\u003cbox>content\u003c/box>` with a `\u003cdiv>content\u003c/div>` and the content to have the isolated scope.\n\nCreating nested structure of directives like this leads to a scope tree pollution. Here's a plunker example (http://plnkr.co/edit/DwukVGGprFFjQuVY8yTz) of three nested directives which create a scope tree structure like this:\n\n```\n\u003c Scope (002) : ng-app\n    \u003c Scope (003) : ng-controller\n        \u003c Scope (004) : box\n        \u003c Scope (005) : ng-transclude\n            \u003c Scope (006) : box\n            \u003c Scope (007) : ng-transclude\n                \u003c Scope (008) : box\n                \u003c Scope (009) : ng-transclude\n```\n\nThis behaviour doesn't seem to add any value to its purpose but creates a lot of confusion among beginners.\n\nAt the moment I use the following workaround which achieves exactly what the previous example does:\n\n```\nui.directive('box', function() {\n    return {\n        restrict: 'E',\n        transclude: true,\n        template: '\u003cdiv/>',\n        replace: true,\n        scope: {},\n        link: function(scope, element, attrs, transclude) {\n            transclude(scope.$parent, function(content) {\n                element.append(content);\n            });\n        }\n    };\n});\n```\n\nHere's a plunker example (http://plnkr.co/edit/46v6IBLkhS71L1WbUDFl) which illustrates this concept. It leaves the scope tree nice and tidy:\n\n```\n\u003c Scope (002) : ng-app\n    \u003c Scope (003) : ng-controller\n        \u003c Scope (004) : box\n        \u003c Scope (005) : box\n        \u003c Scope (006) : box\n```\n\nAnd the 2-way binding works the way many expect when they bind 'value' rather than 'object.value'. (I believe that the fact that passing just 'value' works in some cases but not the other and blaming the nature of prototypal inheritance in javascript is not a good excuse. The fact that many people find this behaviour unexpected indicates that there's an architectural flaw.)\n\nI would love to hear what other people think and use cases where they think that creating a new sibling scope for ng-transclude makes sense.\n","author":{"url":"https://github.com/mbykovskyy","@type":"Person","name":"mbykovskyy"},"datePublished":"2013-12-20T00:41:51Z","url":"https://github.com/angular/angular.js/issues/5489"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ee162f55-af6e-1d5d-0af7-923958908f4c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA1B8:250F1:BCC3A:FFAD2:6AFE13AD
html-safe-noncea5f19a5199afdd65893d6e729d6d3897423c15aef22182a484011fc8094c9f34
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMUI4OjI1MEYxOkJDQzNBOkZGQUQyOjZBRkUxM0FEIiwidmlzaXRvcl9pZCI6IjgyMTUwNzA5MzA1MzE5MTQ2NjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac7788e3c2f7872c8a05b3510cb74af38622e766b08729457f12c7e978633fcd22
hovercard-subject-tagissue:24598778
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular.js/5489/issue_layout
twitter:imagehttps://opengraph.githubassets.com/91c1298ad6e2d1d4fedf41e20646496ff3dc01757580d80556fb3cab2de9cde0/angular/angular.js/issues/5489
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/91c1298ad6e2d1d4fedf41e20646496ff3dc01757580d80556fb3cab2de9cde0/angular/angular.js/issues/5489
og:image:altThis is more of a change request and I would like to see what other people think. In my humble opinion ng-transclude should not create it's own scope or at least have a way to prevent it from doing...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamembykovskyy
hostnamegithub.com
expected-hostnamegithub.com
None3cd8a1d79ccbf9aecac62781f79072482a49047fb982b8c9e2ad4aca8bf6a9af
turbo-cache-controlno-preview
go-importgithub.com/angular/angular.js git https://github.com/angular/angular.js.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id460078
octolytics-dimension-repository_nwoangular/angular.js
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id460078
octolytics-dimension-repository_network_root_nwoangular/angular.js
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release05539640a34afe6142a519483d78ddd766a1304a
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angular.js/issues/5489#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular.js%2Fissues%2F5489
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular.js%2Fissues%2F5489
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fangular.js
Reloadhttps://github.com/angular/angular.js/issues/5489
Reloadhttps://github.com/angular/angular.js/issues/5489
Reloadhttps://github.com/angular/angular.js/issues/5489
angularhttps://github.com/angular
angular.jshttps://github.com/angular/angular.js
Codehttps://github.com/angular/angular.js
Issues389 (389)https://github.com/angular/angular.js/issues
Pull requests72 (72)https://github.com/angular/angular.js/pulls
Actionshttps://github.com/angular/angular.js/actions
Projectshttps://github.com/angular/angular.js/projects
Wikihttps://github.com/angular/angular.js/wiki
Security and qualityhttps://github.com/angular/angular.js/security
Insightshttps://github.com/angular/angular.js/insights
https://github.com/angular/angular.js
ng-transclude should not create new sibling scope.https://github.com/angular/angular.js/issues/5489#top
Lots of commentshttps://github.com/angular/angular.js/issues?q=state%3Aopen%20label%3A%22Lots%20of%20comments%22
component: $compilehttps://github.com/angular/angular.js/issues?q=state%3Aopen%20label%3A%22component%3A%20%24compile%22
frequency: highhttps://github.com/angular/angular.js/issues?q=state%3Aopen%20label%3A%22frequency%3A%20high%22
resolution: won't fixhttps://github.com/angular/angular.js/issues?q=state%3Aopen%20label%3A%22resolution%3A%20won't%20fix%22
type: bughttps://github.com/angular/angular.js/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
1.5.xhttps://github.com/angular/angular.js/milestone/90
https://github.com/mbykovskyy
mbykovskyyhttps://github.com/mbykovskyy
on Dec 20, 2013https://github.com/angular/angular.js/issues/5489#issue-24598778
http://plnkr.co/edit/DwukVGGprFFjQuVY8yTzhttp://plnkr.co/edit/DwukVGGprFFjQuVY8yTz
http://plnkr.co/edit/46v6IBLkhS71L1WbUDFlhttp://plnkr.co/edit/46v6IBLkhS71L1WbUDFl
Nexthttps://github.com/angular/angular.js/issues/5489?timeline_page=1
https://github.com/caitp
caitphttps://github.com/caitp
on Dec 20, 2013https://github.com/angular/angular.js/issues/5489#issuecomment-30981181
http://plnkr.co/edit/EuHaBR26JgAegQKvwOGH?p=previewhttp://plnkr.co/edit/EuHaBR26JgAegQKvwOGH?p=preview
https://github.com/mbykovskyy
mbykovskyyhttps://github.com/mbykovskyy
on Dec 20, 2013https://github.com/angular/angular.js/issues/5489#issuecomment-30981470
IgorMinarhttps://github.com/IgorMinar
on Dec 20, 2013https://github.com/angular/angular.js/issues/5489#event-82722631
https://github.com/IgorMinar
IgorMinarhttps://github.com/IgorMinar
on Dec 20, 2013https://github.com/angular/angular.js/issues/5489#issuecomment-30981575
https://github.com/mbykovskyy
mbykovskyyhttps://github.com/mbykovskyy
on Dec 20, 2013https://github.com/angular/angular.js/issues/5489#issuecomment-30998540
https://github.com/troch
trochhttps://github.com/troch
on Dec 20, 2013https://github.com/angular/angular.js/issues/5489#issuecomment-31005694
http://fiddle.jshell.net/39cgW/3/http://fiddle.jshell.net/39cgW/3/
https://github.com/klamping
klampinghttps://github.com/klamping
on Dec 20, 2013https://github.com/angular/angular.js/issues/5489#issuecomment-31032795
https://github.com/caitp
caitphttps://github.com/caitp
on Dec 20, 2013https://github.com/angular/angular.js/issues/5489#issuecomment-31048725
https://github.com/troch
trochhttps://github.com/troch
on Dec 21, 2013https://github.com/angular/angular.js/issues/5489#issuecomment-31060542
https://github.com/klamping
klampinghttps://github.com/klamping
on Dec 21, 2013https://github.com/angular/angular.js/issues/5489#issuecomment-31066321
https://github.com/caitp
caitphttps://github.com/caitp
on Dec 21, 2013https://github.com/angular/angular.js/issues/5489#issuecomment-31067058
@trochhttps://github.com/troch
https://github.com/marfarma
marfarmahttps://github.com/marfarma
on Dec 23, 2013https://github.com/angular/angular.js/issues/5489#issuecomment-31133201
https://github.com/freshsun
freshsunhttps://github.com/freshsun
on Dec 25, 2013https://github.com/angular/angular.js/issues/5489#issuecomment-31192876
https://github.com/CWSpear
CWSpearhttps://github.com/CWSpear
on Dec 25, 2013https://github.com/angular/angular.js/issues/5489#issuecomment-31193021
https://github.com/schovi
schovihttps://github.com/schovi
on Jan 3, 2014https://github.com/angular/angular.js/issues/5489#issuecomment-31520730
rikukissahttps://github.com/rikukissa
on Jun 16, 2015https://github.com/angular/angular.js/issues/5489#event-331967695
LIVIJUKU-253https://github.com/solita/livijuku-front/commit/44cc9ee7a954f70175e91e0493e7ba64d219ea6d
44cc9eehttps://github.com/solita/livijuku-front/commit/44cc9ee7a954f70175e91e0493e7ba64d219ea6d
petebacondarwinhttps://github.com/petebacondarwin
1.3.x - superluminal-nudgehttps://github.com/angular/angular.js/milestone/32
on Sep 8, 2015https://github.com/angular/angular.js/issues/5489#event-403625535
https://github.com/petebacondarwin
petebacondarwinhttps://github.com/petebacondarwin
on Sep 8, 2015https://github.com/angular/angular.js/issues/5489#issuecomment-138569194
http://plnkr.co/edit/3NVxdYGy1AFDvD0M2BYI?p=previewhttp://plnkr.co/edit/3NVxdYGy1AFDvD0M2BYI?p=preview
http://plnkr.co/edit/MXFz2awcqwQQ7R882Xwz?p=previewhttp://plnkr.co/edit/MXFz2awcqwQQ7R882Xwz?p=preview
https://github.com/troch
trochhttps://github.com/troch
on Sep 8, 2015https://github.com/angular/angular.js/issues/5489#issuecomment-138583248
@petebacondarwinhttps://github.com/petebacondarwin
https://github.com/amitgupta1202
amitgupta1202https://github.com/amitgupta1202
on Sep 8, 2015https://github.com/angular/angular.js/issues/5489#issuecomment-138601489
http://plnkr.co/edit/Wn81IBkE87vtigXvjmIa?p=previewhttp://plnkr.co/edit/Wn81IBkE87vtigXvjmIa?p=preview
http://plnkr.co/edit/KShClgQVwIjscXPzVRwR?p=previewhttp://plnkr.co/edit/KShClgQVwIjscXPzVRwR?p=preview
https://github.com/SanderElias
SanderEliashttps://github.com/SanderElias
on Sep 8, 2015https://github.com/angular/angular.js/issues/5489#issuecomment-138603298
@petebacondarwinhttps://github.com/petebacondarwin
https://github.com/petebacondarwin
petebacondarwinhttps://github.com/petebacondarwin
on Sep 8, 2015https://github.com/angular/angular.js/issues/5489#issuecomment-138627894
@petebacondarwinhttps://github.com/petebacondarwin
https://github.com/petebacondarwinhttps://github.com/petebacondarwin
#5489 (comment)https://github.com/angular/angular.js/issues/5489#issuecomment-138603298
https://github.com/frfancha
frfanchahttps://github.com/frfancha
on Sep 8, 2015https://github.com/angular/angular.js/issues/5489#issuecomment-138656531
@SanderEliashttps://github.com/SanderElias
https://github.com/petebacondarwin
petebacondarwinhttps://github.com/petebacondarwin
on Sep 9, 2015https://github.com/angular/angular.js/issues/5489#issuecomment-138880231
@trochhttps://github.com/troch
https://github.com/lgalfaso
lgalfasohttps://github.com/lgalfaso
on Sep 10, 2015https://github.com/angular/angular.js/issues/5489#issuecomment-139270442
@petebacondarwinhttps://github.com/petebacondarwin
petebacondarwinhttps://github.com/petebacondarwin
completedhttps://github.com/angular/angular.js/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Sep 10, 2015https://github.com/angular/angular.js/issues/5489#event-406524044
petebacondarwinhttps://github.com/petebacondarwin
IgorMinarhttps://github.com/IgorMinar
on Sep 10, 2015https://github.com/angular/angular.js/issues/5489#event-406524215
petebacondarwinhttps://github.com/petebacondarwin
resolution: won't fixhttps://github.com/angular/angular.js/issues?q=state%3Aopen%20label%3A%22resolution%3A%20won't%20fix%22
on Sep 10, 2015https://github.com/angular/angular.js/issues/5489#event-406524559
https://github.com/mbykovskyy
mbykovskyyhttps://github.com/mbykovskyy
on Feb 17, 2016https://github.com/angular/angular.js/issues/5489#issuecomment-185432689
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular.js/issues/5489
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular.js/issues/5489
Lots of commentshttps://github.com/angular/angular.js/issues?q=state%3Aopen%20label%3A%22Lots%20of%20comments%22
component: $compilehttps://github.com/angular/angular.js/issues?q=state%3Aopen%20label%3A%22component%3A%20%24compile%22
frequency: highhttps://github.com/angular/angular.js/issues?q=state%3Aopen%20label%3A%22frequency%3A%20high%22
resolution: won't fixhttps://github.com/angular/angular.js/issues?q=state%3Aopen%20label%3A%22resolution%3A%20won't%20fix%22
type: bughttps://github.com/angular/angular.js/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
1.5.xhttps://github.com/angular/angular.js/milestone/90
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.