node.js - Angular2 with TypeScript: Declaration expected compiler error after @component -


im getting kind of error despite of fact imported component angular2/core should source files not downloaded through npm install or node needs upgrade

here file

import {bootstrap} 'angular2/platform/browser'; import {component, view} 'angular2/core';  @component({  }) 

define class right after component.

import {bootstrap} 'angular2/platform/browser'; import {component, view} 'angular2/core';  @component({  }) class myclass {  } 

@component decorator contains metadata class. in other words defines stuff class in more elegant way.

the @component function takes configuration object , turns metadata attaches component class definition. angular discovers metadata @ runtime , knows how "the right thing".

read more here


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -