1
+ < html lang ="en "> < head > </ head > < body > < form id ="mainForm " method ="post " action ="http://plnkr.co/edit/?p=preview " target ="_self "> < input type ="hidden " name ="files[story.controller.js] " value ="(function () {
2
+ angular
3
+ .module('app', [])
4
+ .controller('StoryController', StoryController);
5
+
6
+ function StoryController() {
7
+ var vm = this;
8
+ vm.story = { id: 100, name: 'The Force Awakens' };
9
+ }
10
+ })();
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+ /*
19
+ Copyright 2016 JohnPapa.net, LLC. All Rights Reserved.
20
+ Use of this source code is governed by an MIT-style license that
21
+ can be found in the LICENSE file at http://bit.ly/l1cense
22
+ */ "> < input type ="hidden " name ="files[index.html] " value ="<!DOCTYPE html>
23
+ <html ng-app="app">
24
+
25
+ <head>
26
+ <meta charset="utf-8" />
27
+ <title>AngularJS Plunker</title>
28
+ <script>document.write('<base href="' + document.location + '" />');</script>
29
+ <script data-require="[email protected] " src="https://code.angularjs.org/1.4.8/angular.js" data-semver="1.4.8"></script>
30
+ <script src="story.controller.js"></script>
31
+ </head>
32
+
33
+ <body ng-controller="StoryController as vm">
34
+ <h3>{{vm.story.name}}</h3>
35
+ <h3 ng-bind="vm.story.name"></h3>
36
+ </body>
37
+
38
+ </html>
39
+
40
+
41
+ <!--
42
+ Copyright 2016 JohnPapa.net, LLC. All Rights Reserved.
43
+ Use of this source code is governed by an MIT-style license that
44
+ can be found in the LICENSE file at http://bit.ly/l1cense
45
+ --> "> < input type ="hidden " name ="tags[0] " value ="angular2 "> < input type ="hidden " name ="tags[1] " value ="example "> < input type ="hidden " name ="tags[2] " value ="first look "> < input type ="hidden " name ="tags[3] " value ="angular 1 "> < input type ="hidden " name ="private " value ="true "> < input type ="hidden " name ="description " value ="Angular 2 Example - Angular 1 - Controller "> < input type ="hidden " name ="files[README.md] " value ="### Angular 2 First Look Example
46
+
47
+ Angular 1 - Controller "> < input type ="hidden " name ="files[systemjs.config.js] " value ="/**
48
+ * PLUNKER VERSION
49
+ * (based on systemjs.config.js in angular.io)
50
+ * System configuration for Angular 2 samples
51
+ * Adjust as necessary for your application needs.
52
+ */
53
+ (function (global) {
54
+ System.config({
55
+ // DEMO ONLY! REAL CODE SHOULD NOT TRANSPILE IN THE BROWSER
56
+ transpiler: 'ts',
57
+ typescriptOptions: {
58
+ tsconfig: true
59
+ },
60
+ meta: {
61
+ 'typescript': {
62
+ "exports": "ts"
63
+ }
64
+ },
65
+ paths: {
66
+ // paths serve as alias
67
+ 'npm:': 'https://unpkg.com/'
68
+ },
69
+ // map tells the System loader where to look for things
70
+ map: {
71
+ // our app is within the app folder
72
+ app: 'app',
73
+ 'main': 'main.js', // PAPA
74
+
75
+ // angular bundles
76
+ '@angular/core': 'npm:@angular/core/bundles/core.umd.js',
77
+ '@angular/common': 'npm:@angular/common/bundles/common.umd.js',
78
+ '@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
79
+ '@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
80
+ '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
81
+ '@angular/http': 'npm:@angular/http/bundles/http.umd.js',
82
+ '@angular/router': 'npm:@angular/router/bundles/router.umd.js',
83
+ '@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
84
+ '@angular/upgrade': 'npm:@angular/upgrade/bundles/upgrade.umd.js',
85
+
86
+ // other libraries
87
+ 'rxjs': 'npm:rxjs',
88
+ 'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js',
89
+ 'ts': 'npm:[email protected] /lib/plugin.js',
90
+ 'typescript': 'npm:[email protected] /lib/typescript.js',
91
+
92
+ },
93
+ // packages tells the System loader how to load when no filename and/or no extension
94
+ packages: {
95
+ 'app/core': { main: 'index' }, // PAPA
96
+ 'app/models': { main: 'index' }, // PAPA
97
+ 'api': { defaultExtension: 'js' }, //PAPA
98
+ app: {
99
+ main: './main.ts',
100
+ defaultExtension: 'ts'
101
+ },
102
+ rxjs: {
103
+ defaultExtension: 'js'
104
+ }
105
+ }
106
+ });
107
+ })(this);
108
+
109
+
110
+
111
+ /*
112
+ Copyright 2016 JohnPapa.net, LLC. All Rights Reserved.
113
+ Use of this source code is governed by an MIT-style license that
114
+ can be found in the LICENSE file at http://bit.ly/l1cense
115
+ */ "> < input type ="hidden " name ="files[tsconfig.json] " value ="{
116
+ "compilerOptions": {
117
+ "target": "es5",
118
+ "module": "commonjs",
119
+ "moduleResolution": "node",
120
+ "sourceMap": true,
121
+ "emitDecoratorMetadata": true,
122
+ "experimentalDecorators": true,
123
+ "removeComments": false,
124
+ "noImplicitAny": false,
125
+ "suppressImplicitAnyIndexErrors": true
126
+ }
127
+ }
128
+ "> </ form > < script > document . getElementById ( "mainForm" ) . submit ( ) ; </ script > </ body > </ html >
0 commit comments