angularjs2 公共部分

import {bootstrap} from 'angular2/platform/browser';


import {AppComponent} from './app';

bootstrap(AppComponent).catch(err => console.error(err));

/*
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
*/

import {bootstrap}        from 'angular2/platform/browser';
import {ROUTER_PROVIDERS} from 'angular2/router';

import {AppComponent}     from './app';

// Add these symbols to override the `LocationStrategy`
//import {provide}           from 'angular2/core';
//import {LocationStrategy,
//        HashLocationStrategy} from 'angular2/router';

bootstrap(AppComponent, [ROUTER_PROVIDERS,
    //provide(LocationStrategy,
    //       {useClass: HashLocationStrategy}) // .../#/crisis-center/
]);


/*
 Copyright 2016 Google Inc. All Rights Reserved.
 Use of this source code is governed by an MIT-style license that
 can be found in the LICENSE file at http://angular.io/license
 */


<!DOCTYPE html>
<html>
  <head>
    <title>Angular 2 Demo</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- IE required polyfills, in this exact order -->
    <script src="lib/es6-shim.min.js"></script>
    <script src="lib/system-polyfills.js"></script>
    <script src="lib/shims_for_IE.js"></script>

    <script src="lib/angular2-polyfills.js"></script>
    <script src="lib/system.js"></script>
    <script src="lib/typescript.js"></script>
    <script src="lib/Rx.js"></script>
    <script src="lib/angular2.dev.js"></script>
    <script>
      System.config({
        transpiler: 'typescript', 
        typescriptOptions: { emitDecoratorMetadata: true }, 
        packages: {'app': {defaultExtension: 'ts'}} 
      });
      System.import('app/main')
            .then(null, console.error.bind(console));
    </script>
  </head>

  <body>
    <my-app>Loading...</my-app>
  </body>

</html>

<!-- 
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
-->


<!DOCTYPE html>
<html>
<head>
  <!-- Set the base href -->
  <script>document.write('<base href="' + document.location + '" />');</script>

  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="styles.css">

  <!-- IE required polyfills, in this exact order -->
  <script src="lib/es6-shim.min.js"></script>
  <script src="lib/system-polyfills.js"></script>
  <script src="lib/shims_for_IE.js"></script>

  <script src="lib/angular2-polyfills.js"></script>
  <script src="lib/system.js"></script>
  <script src="lib/typescript.js"></script>
  <script src="lib/Rx.js"></script>
  <script src="lib/angular2.dev.js"></script>

  <!-- Add the router library -->
  <script src="lib/router.dev.js"></script>

  <script>
    System.config({
      transpiler: 'typescript',
      typescriptOptions: { emitDecoratorMetadata: true },
      packages: {'app': {defaultExtension: 'ts'}}
    });
    System.import('app/main')
            .then(null, console.error.bind(console));
  </script>
</head>

<body>
<my-app>loading...</my-app>
</body>

</html>


<!-- 
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
-->


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值