Difference between angular2/core and @angular/core

后端 未结 3 1823
鱼传尺愫
鱼传尺愫 2020-12-07 00:48

Might be very stupid but I have seen several uses of

import {Component} from \'angular2/core\'

and

import {Component} fro         


        
相关标签:
3条回答
  • 2020-12-07 00:59

    Since the first release candidate the packages are repackaging into individual packages. There is now one package for each feature area.

    angular2/core (before rc.0) -> @angular/core (>= rc.0) 
    
    0 讨论(0)
  • 2020-12-07 00:59

    import {Component} from 'angular2/core' for versions <= beta.x

    import {Component} from '@angular/core' for >= RC.x

    0 讨论(0)
  • 2020-12-07 01:25

    Angular2 team has repackaged Angular and all those packages are distributed under @Angular npm scope.

    Read here more from official docs and check various changed paths with RC relase, https://github.com/angular/angular/blob/master/CHANGELOG.md (2.0.0-rc.0 (2016-05-02))

    # When Angular2 was going through Beta Releases, we used import various symbols from angular2/core.

    # Now Angular2 is going through Release candidate(RC), we have to import various symbols from @angular/core.

    0 讨论(0)
提交回复
热议问题