Skip to content

Commit 49576d2

Browse files
author
Vladimir Enchev
committed
support for platform specific attributes added
1 parent 1da973d commit 49576d2

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

tsconfig.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@
159159
"./apps/tests/pages/page15.ts",
160160
"./apps/tests/pages/page16.ts",
161161
"./apps/tests/pages/page17.ts",
162+
"./apps/tests/pages/page18.ts",
162163
"./apps/tests/pages/page5.ts",
163164
"./apps/tests/pages/page6.ts",
164165
"./apps/tests/pages/page7.ts",
@@ -176,6 +177,9 @@
176177
"./apps/tests/ui-test.ts",
177178
"./apps/tests/ui/activity-indicator/activity-indicator-tests.ts",
178179
"./apps/tests/ui/bindable-tests.ts",
180+
"./apps/tests/ui/bindingContext_testPage.ts",
181+
"./apps/tests/ui/bindingContext_testPage1.ts",
182+
"./apps/tests/ui/bindingContext_testPage2.ts",
179183
"./apps/tests/ui/border/border-tests.ts",
180184
"./apps/tests/ui/button/button-tests-native.android.ts",
181185
"./apps/tests/ui/button/button-tests-native.d.ts",

ui/builder/component-builder.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import definition = require("ui/builder/component-builder");
99
import fs = require("file-system");
1010
import gestures = require("ui/gestures");
1111
import bindingBuilder = require("ui/builder/binding-builder");
12+
import platform = require("platform");
1213

1314
var EVENT = "Event";
1415
var UI_PATH = "ui/";
@@ -76,6 +77,13 @@ export function getComponentModule(elementName: string, namespace: string, attri
7677

7778
var attrValue = <string>attributes[attr];
7879

80+
if (attr.indexOf(":") !== -1){
81+
var platformName = attr.split(":")[0].trim();
82+
if(platformName.toLowerCase() !== platform.device.os.toLowerCase()) {
83+
continue;
84+
}
85+
}
86+
7987
if (attr.indexOf(".") !== -1) {
8088
var subObj = instance;
8189
var properties = attr.split(".");

0 commit comments

Comments
 (0)