This method allows an Angular Element to be used in AngularJS with little effort.
This is not an officially supported Google product.
To use:
- Create a Angular Component.
- In the bootstrap file, create an angular element.
- After the element is created, call createNg1Wrapper to wrap the custom element in a AngularJS component.
- Add the generated AngularJS component to an AngularJS module and use as if it were AngularJS.
A simple demo can be found here: https://create-ng1-wrapper-app.firebaseapp.com/
Credit: @siddharthpal
Every file containing source code must include copyright and license information. This includes any JS/CSS files that you might be serving out to browsers. (This is to help well-intentioned people avoid accidental copying that doesn't comply with the license.)
Apache header:
Copyright 2018 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.