How does Angular2 import its components?

后端 未结 2 910
感情败类
感情败类 2021-01-23 11:52

I am pretty new to AngularJS 2.0. When I read its quickstart guide and some other posts, there are import lines like this:

import {Component, View,          


        
2条回答
  •  臣服心动
    2021-01-23 12:21

    Here 'angular2/angular2' is not a path but a predefined systemjs bundle for angular. In your index.html you have to load the system.js script ahead of angular.

提交回复
热议问题