Comments (3)
you probably found a bug on angular2, since other type of pipes work, can you post the issue to the angular2 repo?
probably related to this too
from angular-starter.
Hey Antony,
You are right, this is definitely an angular bug. That is also the same bug that you linked in angular, so there is no need for a double-post. Another interesting bug also happens when a pipe is extending another pipe. It works completely fine when running gulp. But for gulp test, we get this error:
Failed: Template parse errors:
The pipe 'customLowercase' could not be found ("
</div>
</div>
</div>[ERROR ->]
{{foo | customLowercase}}"): SimplebindComponent@42:6
For the customLowercase:
import {Pipe, PipeTransform} from 'angular2/core';
import {ParentPipe} from './customParent.pipe';
@Pipe({name: 'customLowercase'})
export class CustomLowercase extends ParentPipe implements PipeTransform {}
ParentPipe:
import {Pipe, PipeTransform} from 'angular2/core';
@Pipe({name: 'parentPipe'})
export class ParentPipe implements PipeTransform {
transform(value: string, args: any[]): string {
return value.toLowerCase();
}
}
Simplebind:
import {Component} from 'angular2/core';
import {ChildComponent} from './child.component';
import {CustomLowercase} from './customLowercase.pipe';
import {ParentPipe} from './customParent.pipe';
@Component({
selector: 'simplebind',
templateUrl: 'app/simplebind/simplebind.html',
directives: [ChildComponent],
pipes: [CustomLowercase, ParentPipe]
})
export class SimplebindComponent {
public foo = 'TESTING';
private myname: string;
constructor() {
this.myname = 'Simple';
}
}
I will post this different bug in angular repo. Then again, I think, it might not be a good design anyways to extend pipes, but rather, compose shared functionality instead.
from angular-starter.
ok, i will close this issue then since it's not starter/setup related problem, thank you 👍
from angular-starter.
Related Issues (20)
- problem between npm start and npm run build on style sheet HOT 2
- remove Todolist module HOT 2
- import { filter } from 'lodash'; HOT 2
- materialize (question) HOT 2
- npm run build no long deployes properly HOT 1
- npm run build is broken HOT 1
- Problem with report generation HOT 3
- No file change on the screen, despite recompile (RaydonZhu comment) HOT 7
- Serving from the root folder HOT 6
- Move the src folder contents HOT 2
- Update to typescript 2.1?
- where is tree shaking config? HOT 1
- lodash Partial - too old Typescript used HOT 1
- does it support lazy loading? HOT 1
- Lazy loading HOT 1
- Can't start freshly cloned project. HOT 4
- Debug TS files not working in Chrome HOT 2
- How do I switch this project to support universial HOT 1
- Will it work with Visual Studio . I tried but facing some unexpected token errors while loading files HOT 6
- Upgrade to Angular 5 causing remap-istanbul html report generation to fail HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-starter.