Since I’m recently working on an angular project, I started to get curious about the angular 2 version. I started with the quick start demo and everything went very smooth. So the next step was the Displaying Data example. It was then when it started to get wrong. I was following the walkthrough, but the result I got was a blank page.
After some research I discovered that that the angular developers made a breaking change in the alpha 35 version. All the classes ending on Annotation(s) where renamed to Metadata. Another difference is that you need to use the ng object instead of angular on the window.
If you want to get the Displaying Data example to work in es5, you will need to do the following:
show-properties.js:
1: (function () {
2: // ES5
3: function DisplayComponent() {
4: this.myName = "Alice";
5: }
6:
7: DisplayComponent.annotations = [
8: new ng.ComponentMetadata({
9: selector: "display"
10: }),
11: new ng.ViewMetadata({
12: template:
13: '<p>My name: {{ myName }}</p>'
14: })
15: ];
16:
17: document.addEventListener('DOMContentLoaded', function () {
18: ng.bootstrap(DisplayComponent);
19: });
20: })();
<html>
<head>
<script src="angular2.sfx.dev.js"></script>
<script src="show-properties.js"><script>
</head>
<body>
<display></display>
</body>
</html>
Thank you! It helped me very much!
ReplyDeleteIt should be helpful but it wasn't really clear. Thank you for sharing those tips. I would like to ask you to make them more detailed.
ReplyDeleteThis blog is really great.This site is very helpful and informational : click here
ReplyDeleteEach optical disc is able to store as much data as five hundred floppy disks. Thus, storage of data and retrieval is easier and much faster now. Self Storage
ReplyDeletei have a couple of friends who work as network administrators and would probabbly use this kind of help thanks for sharing such an awesome piece il refer them to your blog
ReplyDelete
ReplyDeleteMobility| Austere Technologies
REALLY VERY EXCELLENT INFORMATION. THIS BLOG IMFORMATION VERY GOOD AND WE ALSO PROVIDING BEST SERVICES.
you helped me a lot, I work as an intern and did not know how to accomplish the task, but you corrected everything and helped me
ReplyDeleteVery good informative article. Thanks for sharing such nice article, keep on up dating such good articles.
ReplyDeletesoftware security Services | Austere Technologies
Really great blog, it's very helpful and has great knowledgeable information. Thanks for sharing.
ReplyDeleteBest Software Company in USA | Austere Technologies
Looking really very informative impressed very much with this blog, like to watch regularly to get more updates...
ReplyDeleteBest Online Software Training Institute | Data Science Training
Very good informative article. Thanks for sharing such nice article, keep on up dating such good articles.
ReplyDeleteBest Commerce College| Avinash college of commerce
Wow...What an excellent informative blog, really helpful. Thank you.
ReplyDeleteBest Commerce College in Hyderabad | Avinash College of Commerce
Nice Blog Thank providing Useful Information
ReplyDeleteIt Training
Thank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book Andaman Nicobar Tour Packages @ 11599
ReplyDeleteThank You for Sharing Useful information
ReplyDeleteSap basis training in Hyderabad
Great post! I am actually getting ready to across this information, It’s very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
ReplyDeleteDeops training in annanagar
Devops training in chennai
Devops training in marathahalli
Devops training in rajajinagar
Devops training in BTM Layout
Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
ReplyDeleteData science training in tambaram
Data science training in kalyan nagar
Data Science training in OMR
Data Science training in anna nagar
Data Science training in chennai
Data Science training in marathahalli
Data Science training in BTM layout
Data Science training in rajaji nagar
Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
ReplyDeletejava training in chennai | java training in bangalore
java online training | java training in pune
selenium training in chennai
selenium training in bangalore
The advice is always the same: publish quality content. But where? On your profile, it's clear. But you can do it in different ways. For example, you can use the official feed with posting photos and collages.https://buymorefollower.com/
ReplyDeleteThen there are the mini-videos that work well. But what gives your profile great visibility, with relative increase in followers, is the work on Instagram Stories. Without forgetting the possibility of operating also with the video content marketing of IGTV, the Instagram television.
All this helps to create a variety of useful content to increase the potential audience you want to add to the potential followers of the profile.