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

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -