|
| 1 | +@{layout('')} |
| 2 | + |
| 3 | +<!DOCTYPE html> |
| 4 | +<html> |
| 5 | +<head> |
| 6 | + <title>Angular.js 2.0</title> |
| 7 | + <meta charset="utf-8" /> |
| 8 | + <meta http-equiv="X-UA-Compatible" content="IE=11" /> |
| 9 | + <meta name="format-detection" content="telephone=no" /> |
| 10 | + <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" /> |
| 11 | + <meta name="robots" content="all,follow" /> |
| 12 | + |
| 13 | + <script src="https://code.angularjs.org/2.0.0-beta.17/Rx.umd.js"></script> |
| 14 | + <script src="https://code.angularjs.org/2.0.0-beta.17/angular2-polyfills.js"></script> |
| 15 | + <script src="https://code.angularjs.org/2.0.0-beta.17/angular2-all.umd.dev.js"></script> |
| 16 | + |
| 17 | +</head> |
| 18 | +<body> |
| 19 | + <company-app> |
| 20 | + Loading ... |
| 21 | + </company-app> |
| 22 | + |
| 23 | + <script> |
| 24 | + (function() { |
| 25 | + |
| 26 | + var HelloWorldComponent = function() {}; |
| 27 | + |
| 28 | + HelloWorldComponent.annotations = [ |
| 29 | + new ng.core.Component({ |
| 30 | + selector: 'hello-world', |
| 31 | + template: '<h1>Hello Angular2!</h1>' |
| 32 | + }) |
| 33 | + ]; |
| 34 | + |
| 35 | + var HelloFlentApi = ng.core.Component({ |
| 36 | + selector: 'hello-fluent', |
| 37 | + template: '<h1>Hello {{name}}!</h1>' + '<input [(ngModel)]="name">', |
| 38 | + }).Class({ |
| 39 | + constructor: function() { |
| 40 | + this.name = "Fluent API"; |
| 41 | + } |
| 42 | + }); |
| 43 | + |
| 44 | + var AppComponent = ng.core.Component({ |
| 45 | + selector: 'company-app', |
| 46 | + template: '<hello-world></hello-world>' + |
| 47 | + '<hello-fluent></hello-fluent>', |
| 48 | + directives: [HelloWorldComponent, HelloFlentApi] |
| 49 | + }).Class({ |
| 50 | + constructor: function() {} |
| 51 | + }); |
| 52 | + |
| 53 | + document.addEventListener("DOMContentLoaded", function() { |
| 54 | + ng.platform.browser.bootstrap(AppComponent); |
| 55 | + }); |
| 56 | + |
| 57 | + }()); |
| 58 | + </script> |
| 59 | +</body> |
| 60 | +</html> |
0 commit comments