typescript - Angular2 - Pipes and syntax -


im trying create lowercase pipe in angular2 , im running issues im getting

 syntax errors got ';' 

app/lowercase.ts

import {pipe, pipetransform} '@angular/core';   @pipe({ name: 'lowercase1'}) export class lowercasepipe1 implements pipetransform {    transform (value: string): string {     if (!value) return value;     if (typeof value !== 'string'){       throw new error('invalid pipe value: ', value);     }     return value.tolowercase();   } } 

app/app.component.ts

import {component} '@angular/core'; import {lowercasepipe1} './lowercase';   @component({   selector: 'app',     pipes: [lowercasepipe1],     template: '<h1>{{"sample" | lowercase1 }} </h1>' }) export class app {   console.info('lower case app') } 

app/index.ts

import {bootstrap} '@angular/platform-browser-dynamic'; import {app} './app.component'; //  bootstrap(app) 

here plunkr: http://plnkr.co/edit/cob5agwvpihuvcnbtx9d?p=preview

the problem in system.config.js file.

plunker example built plunker angular2 ts template works fine.


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -