|
1 | 1 | <html> |
2 | 2 | <head> |
| 3 | + <title>ArcGIS JS API 3 & Angular 2</title> |
| 4 | + <meta charset="UTF-8"> |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 6 | + |
| 7 | + <!--load styles--> |
3 | 8 | <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> |
4 | 9 | <link rel="stylesheet" href="//js.arcgis.com/3.16/esri/themes/calcite/dijit/calcite.css"> |
5 | 10 | <link rel="stylesheet" href="//js.arcgis.com/3.16/esri/themes/calcite/esri/esri.css"> |
6 | 11 | <link rel="stylesheet" href="app/styles/main.css"> |
7 | | - <title>ArcGIS JS API 3 & Angular 2</title> |
8 | 12 |
|
9 | | - <!-- 1. Load Angular libraries --> |
10 | | - <script src="node_modules/angular2/bundles/angular2-polyfills.js"></script> |
| 13 | + <!-- 1. Load libraries --> |
| 14 | + <!-- Polyfill(s) for older browsers --> |
| 15 | + <script src="node_modules/core-js/client/shim.min.js"></script> |
| 16 | + <script src="node_modules/zone.js/dist/zone.js"></script> |
| 17 | + <script src="node_modules/reflect-metadata/Reflect.js"></script> |
11 | 18 | <script src="node_modules/systemjs/dist/system.src.js"></script> |
12 | | - <script src="node_modules/rxjs/bundles/Rx.js"></script> |
13 | | - <script src="node_modules/angular2/bundles/angular2.dev.js"></script> |
14 | | - |
| 19 | + <script src="systemjs.config.js"></script> |
| 20 | + |
15 | 21 | <!-- 2. Configure and load Esri libraries --> |
16 | 22 | <script> |
17 | 23 | window.dojoConfig = { |
|
20 | 26 | </script> |
21 | 27 | <script src="https://js.arcgis.com/3.16/"></script> |
22 | 28 | <script src="node_modules/esri-system-js/dist/esriSystem.js"></script> |
| 29 | + |
| 30 | + <!-- 3. Configure SystemJS --> |
| 31 | + <script src="systemjs.config.js"></script> |
| 32 | + <script> |
| 33 | + // load esri modules needed by this application |
| 34 | + // into a System.js module called esri |
| 35 | + esriSystem.register([ |
| 36 | + 'esri/arcgis/utils', |
| 37 | + 'esri/basemaps', |
| 38 | + 'esri/dijit/Legend', |
| 39 | + 'esri/dijit/Search' |
| 40 | + ], function () { |
| 41 | + // then bootstrap application |
| 42 | + System.import('app') |
| 43 | + .catch(function(err){ console.error(err); }); |
| 44 | + }, { |
| 45 | + moduleNameOverrides: { |
| 46 | + 'esri/arcgis/utils': 'arcgisUtils', |
| 47 | + 'esri/basemaps': 'esriBasemaps' |
| 48 | + } |
| 49 | + }); |
| 50 | + </script> |
23 | 51 | </head> |
24 | 52 |
|
25 | 53 | <!-- 3. Display the application --> |
26 | 54 | <body class="calcite"> |
27 | 55 | <div class="container-fluid"> |
28 | 56 | <my-app>Loading...</my-app> |
29 | 57 | </div> |
30 | | - <script> |
31 | | - // configure system.js |
32 | | - System.config({ |
33 | | - packages: { |
34 | | - app: { |
35 | | - defaultExtension: 'js' |
36 | | - } |
37 | | - } |
38 | | - }); |
39 | | - // load esri modules needed by this application |
40 | | - // into a System.js module called esri |
41 | | - esriSystem.register([ |
42 | | - 'esri/arcgis/utils', |
43 | | - 'esri/basemaps', |
44 | | - 'esri/dijit/Legend', |
45 | | - 'esri/dijit/Search' |
46 | | - ], function () { |
47 | | - // then bootstrap application |
48 | | - System.import('app/boot') |
49 | | - .then(null, console.error.bind(console)); |
50 | | - }, { |
51 | | - moduleNameOverrides: { |
52 | | - 'esri/arcgis/utils': 'arcgisUtils', |
53 | | - 'esri/basemaps': 'esriBasemaps' |
54 | | - } |
55 | | - }); |
56 | | - </script> |
57 | | - </body> |
58 | | - |
| 58 | + </body> |
59 | 59 | </html> |
0 commit comments