Created
February 3, 2014 20:45
-
-
Save Nevraeka/8792033 to your computer and use it in GitHub Desktop.
Angular Web Component Integration - Psuedo Code Concept
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('web-platform', ["$ComponentSvc","$PolyfillSvc"]).component('ngw-picture', | |
["$components", function($components) { | |
return { | |
scope: {}, | |
link: function($scope, $customElement, $attrs) { | |
var srcSets = $customElement.find('ngw-src-set'); | |
// checks name for syntax - returns error if syntax is incorrect | |
// uses name to generate | |
// If this.shadow - isolated scope required (handle with error) | |
// $element becomes a jQLite wrapper around the custom element | |
// * registers element | |
// * exports element | |
// * creates $element.shadow (if exists) | |
// * | |
// Questions | |
// * How does this.priority work? | |
// * How do nested shadowRoots work? | |
// * Export to the module for component management (not window object) | |
// Generated injectables | |
// $import // gets the $element import if it exists | |
// $shadow // fetch $element shadowRoot | |
// $template // fetch the $element template | |
// Generated LifeCycle Events based on attrs | |
// $element.<attr>Changed | |
// $element.created | |
// $element.leave | |
// $element.enter | |
} | |
}; | |
} | |
]); | |
angular.module('myApp', ['web-platform']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment