fix: flip attr / property bind in directives annotations
Fixes #648 Closes #684
This commit is contained in:
@ -28,31 +28,31 @@ function setupReflector() {
|
||||
reflector.registerType(Dir0, {
|
||||
"factory": () => new Dir0(),
|
||||
"parameters": [],
|
||||
"annotations" : [new Decorator({selector: '[dir0]', bind: {'attr0': 'prop'}})]
|
||||
"annotations" : [new Decorator({selector: '[dir0]', bind: {'prop': 'attr0'}})]
|
||||
});
|
||||
|
||||
reflector.registerType(Dir1, {
|
||||
"factory": (dir0) => new Dir1(dir0),
|
||||
"parameters": [[Dir0]],
|
||||
"annotations" : [new Decorator({selector: '[dir1]', bind: {'attr1': 'prop'}})]
|
||||
"annotations" : [new Decorator({selector: '[dir1]', bind: {'prop': 'attr1'}})]
|
||||
});
|
||||
|
||||
reflector.registerType(Dir2, {
|
||||
"factory": (dir1) => new Dir2(dir1),
|
||||
"parameters": [[Dir1]],
|
||||
"annotations" : [new Decorator({selector: '[dir2]', bind: {'attr2': 'prop'}})]
|
||||
"annotations" : [new Decorator({selector: '[dir2]', bind: {'prop': 'attr2'}})]
|
||||
});
|
||||
|
||||
reflector.registerType(Dir3, {
|
||||
"factory": (dir2) => new Dir3(dir2),
|
||||
"parameters": [[Dir2]],
|
||||
"annotations" : [new Decorator({selector: '[dir3]', bind: {'attr3': 'prop'}})]
|
||||
"annotations" : [new Decorator({selector: '[dir3]', bind: {'prop': 'attr3'}})]
|
||||
});
|
||||
|
||||
reflector.registerType(Dir4, {
|
||||
"factory": (dir3) => new Dir4(dir3),
|
||||
"parameters": [[Dir3]],
|
||||
"annotations" : [new Decorator({selector: '[dir4]', bind: {'attr4': 'prop'}})]
|
||||
"annotations" : [new Decorator({selector: '[dir4]', bind: {'prop': 'attr4'}})]
|
||||
});
|
||||
|
||||
reflector.registerGetters({
|
||||
@ -117,7 +117,7 @@ function createTemplateHtml(templateId, repeatCount) {
|
||||
@Decorator({
|
||||
selector: '[dir0]',
|
||||
bind: {
|
||||
'attr0': 'prop'
|
||||
'prop': 'attr0'
|
||||
}
|
||||
})
|
||||
class Dir0 {}
|
||||
@ -125,7 +125,7 @@ class Dir0 {}
|
||||
@Decorator({
|
||||
selector: '[dir1]',
|
||||
bind: {
|
||||
'attr1': 'prop'
|
||||
'prop': 'attr1'
|
||||
}
|
||||
})
|
||||
class Dir1 {
|
||||
@ -135,7 +135,7 @@ class Dir1 {
|
||||
@Decorator({
|
||||
selector: '[dir2]',
|
||||
bind: {
|
||||
'attr2': 'prop'
|
||||
'prop': 'attr2'
|
||||
}
|
||||
})
|
||||
class Dir2 {
|
||||
@ -145,7 +145,7 @@ class Dir2 {
|
||||
@Decorator({
|
||||
selector: '[dir3]',
|
||||
bind: {
|
||||
'attr3': 'prop'
|
||||
'prop': 'attr3'
|
||||
}
|
||||
})
|
||||
class Dir3 {
|
||||
@ -155,7 +155,7 @@ class Dir3 {
|
||||
@Decorator({
|
||||
selector: '[dir4]',
|
||||
bind: {
|
||||
'attr4': 'prop'
|
||||
'prop': 'attr4'
|
||||
}
|
||||
})
|
||||
class Dir4 {
|
||||
|
@ -104,7 +104,7 @@ export function setupReflectorForCells() {
|
||||
new Component({
|
||||
selector: 'company-name',
|
||||
bind: {
|
||||
'cell-width': 'width',
|
||||
'width': 'cell-width',
|
||||
'company': 'company'
|
||||
}
|
||||
}),
|
||||
@ -122,7 +122,7 @@ export function setupReflectorForCells() {
|
||||
new Component({
|
||||
selector: 'opportunity-name',
|
||||
bind: {
|
||||
'cell-width': 'width',
|
||||
'width': 'cell-width',
|
||||
'opportunity': 'opportunity'
|
||||
}
|
||||
}),
|
||||
@ -140,7 +140,7 @@ export function setupReflectorForCells() {
|
||||
new Component({
|
||||
selector: 'offering-name',
|
||||
bind: {
|
||||
'cell-width': 'width',
|
||||
'width': 'cell-width',
|
||||
'offering': 'offering'
|
||||
}
|
||||
}),
|
||||
@ -158,7 +158,7 @@ export function setupReflectorForCells() {
|
||||
new Component({
|
||||
selector: 'stage-buttons',
|
||||
bind: {
|
||||
'cell-width': 'width',
|
||||
'width': 'cell-width',
|
||||
'offering': 'offering'
|
||||
}
|
||||
}),
|
||||
@ -184,7 +184,7 @@ export function setupReflectorForCells() {
|
||||
new Component({
|
||||
selector: 'account-cell',
|
||||
bind: {
|
||||
'cell-width': 'width',
|
||||
'width': 'cell-width',
|
||||
'account': 'account'
|
||||
}
|
||||
}),
|
||||
@ -207,7 +207,7 @@ export function setupReflectorForCells() {
|
||||
new Component({
|
||||
selector: 'formatted-cell',
|
||||
bind: {
|
||||
'cell-width': 'width',
|
||||
'width': 'cell-width',
|
||||
'value': 'value'
|
||||
}
|
||||
}),
|
||||
|
@ -158,7 +158,7 @@ export function setupReflectorForAngular() {
|
||||
'annotations' : [new Viewport({
|
||||
selector: '[if]',
|
||||
bind: {
|
||||
'if': 'condition'
|
||||
'condition': 'if'
|
||||
}
|
||||
})]
|
||||
});
|
||||
@ -169,7 +169,7 @@ export function setupReflectorForAngular() {
|
||||
'annotations' : [new Viewport({
|
||||
selector: '[foreach]',
|
||||
bind: {
|
||||
'in': 'iterableChanges[]'
|
||||
'iterableChanges[]': 'in'
|
||||
}
|
||||
})]
|
||||
});
|
||||
|
@ -54,7 +54,7 @@ function setupReflector() {
|
||||
'annotations' : [new Viewport({
|
||||
selector: '[ng-if]',
|
||||
bind: {
|
||||
'ng-if': 'ngIf'
|
||||
'ngIf': 'ng-if'
|
||||
}
|
||||
})]
|
||||
});
|
||||
|
Reference in New Issue
Block a user