<!DOCTYPE html>
<html>
<head>
<title>Angular 2 QuickStart</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="http://www.telerik.com/kendo-angular-ui/npm/node_modules//@progress/kendo-theme-default/dist/all.css" />
<!-- 1. Load libraries -->
<!-- Polyfill(s) for older browsers -->
<script src="https://unpkg.com/core-js/client/shim.min.js"></script>
<script src="https://unpkg.com/zone.js@0.6.23?main=browser"></script>
<script src="https://unpkg.com/reflect-metadata@0.1.3"></script>
<script src="https://unpkg.com/systemjs@0.19.27/dist/system.src.js"></script>
<!-- 2. Configure SystemJS -->
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err) {
console.error(err);
});
</script>
<!-- Example-specific styles -->
<style>
html,
body {
overflow: hidden;
}
body {
font-family: "RobotoRegular", Helvetica, Arial, sans-serif;
font-size: 14px;
margin: 0;
}
my-app {
display: block;
width: 100%;
overflow: hidden;
min-height: 80px;
box-sizing: border-box;
padding: 30px;
}
my-app > .k-loading {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.example-wrapper {
min-height: 280px;
}
.example-wrapper p,
.example-col p {
margin: 0 0 10px;
}
.example-wrapper p:first-child,
.example-col p:first-child {
margin-top: 0;
}
.example-col {
display: inline-block;
vertical-align: top;
padding-right: 20px;
padding-bottom: 20px;
}
.example-config {
margin: 0 0 20px;
padding: 20px;
background-color: rgba(0, 0, 0, .03);
border: 1px solid rgba(0, 0, 0, .08);
}
</style>
</head>
<!-- 3. Display the application -->
<body>
<my-app>Loading...</my-app>
</body>
</html>
(function (global) {
var angularVersion = '2.4.2';
System.config({
// DEMO ONLY! REAL CODE SHOULD NOT TRANSPILE IN THE BROWSER
transpiler: 'ts',
typescriptOptions: {
tsconfig: true
},
meta: {
'typescript': {
"exports": "ts"
}
},
paths: {
// paths serve as alias
'npm:': 'https://unpkg.com/'
},
// map tells the System loader where to look for things
map: {
// our app is within the app folder
app: 'app',
'@progress': 'http://www.telerik.com/kendo-angular-ui/npm/node_modules/@progress',
'@telerik': 'http://www.telerik.com/kendo-angular-ui/npm/node_modules/@telerik',
// angular bundles
'@angular/core': 'npm:@angular/core@' + angularVersion +'/bundles/core.umd.js',
'@angular/common': 'npm:@angular/common@' + angularVersion +'/bundles/common.umd.js',
'@angular/compiler': 'npm:@angular/compiler@' + angularVersion +'/bundles/compiler.umd.js',
'@angular/platform-browser': 'npm:@angular/platform-browser@' + angularVersion +'/bundles/platform-browser.umd.js',
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic@' + angularVersion +'/bundles/platform-browser-dynamic.umd.js',
'@angular/http': 'npm:@angular/http@' + angularVersion +'/bundles/http.umd.js',
'@angular/http/testing': 'npm:@angular/http@' + angularVersion +'/bundles/http-testing.umd.js',
'@angular/forms': 'npm:@angular/forms@' + angularVersion + '/bundles/forms.umd.js',
'@angular/router': 'npm:@angular/router@3.0.0-rc.3/bundles/router.umd.js',
// other libraries
'rxjs': 'npm:rxjs',
'hammerjs': 'npm:hammerjs@2',
'angular2-in-memory-web-api': 'npm:angular2-in-memory-web-api',
'ts': 'npm:plugin-typescript@4.0.10/lib/plugin.js',
'typescript': 'npm:typescript@1.9.0-dev.20160409/lib/typescript.js'
},
// packages tells the System loader how to load when no filename and/or no extension
packages: {
"@progress/kendo-angular-dropdowns": {"main":"dist/cdn/js/kendo-angular-dropdowns.js","defaultExtension":"js"},
app: {
main: './main.ts',
defaultExtension: 'ts'
},
rxjs: {
defaultExtension: 'js'
},
'angular2-in-memory-web-api': {
main: './index.js',
defaultExtension: 'js'
},
'@progress/kendo-data-query': {
main: 'dist/cdn/js/kendo-data-query.js',
defaultExtension: 'js'
},
'@progress/kendo-file-saver': {
main: 'dist/npm/main.js',
defaultExtension: 'js'
}
}
});
})(this);
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true
}
}
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';
const platform = platformBrowserDynamic();
platform.bootstrapModule(AppModule);
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
template: `
<div class="example-wrapper">
<p>Select Item:</p>
<kendo-dropdownlist [data]="listItems">
</kendo-dropdownlist>
</div>
`
})
export class AppComponent {
public listItems: Array<string> = ["Item-1", "Item-2", "Item-3", "Item-4", "Item-5"];
}
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
import { HttpModule } from '@angular/http';
import 'hammerjs';
import { AppComponent } from './app.component';
@NgModule({
imports: [ BrowserModule, DropDownsModule, HttpModule ],
declarations: [ AppComponent ],
bootstrap: [ AppComponent ]
})
export class AppModule { }