angular - Javascript "Import" Keyword as Used in Angular2? -


import {component, view} "angular2/core"; 

what angular2/core part here? thought reference. on checking mdn on subject, still don't it, syntax clear:

import { member1 , member2 } "module-name"; 

module-name: name of module import. file name.

i don't understand whether or not supposed path, "file name" implies - js file in "angular2" folder. doesn't seem be, since angular files in 'node_modules' folder , don't have called "angular2" there (i have called "@angular" "core" folder). if core folder it, don't understand syntax. why "@"? why not path? why mdn file-name when it's folder? basically, how import statement work, exactly?

another example of in plunk maintained angular team (afaik), in app.ts:

import {component, ngmodule} '@angular/core' 

edit: adding screenshot - there auto-magic going on , don't understand how works. if file in "angular2practice" , import navigated node_modules/@angular/core - make sense. way now...it have scan parent folders file or something. that's not case , missing something:

enter image description here


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -