mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
support for platform specific attributes added
This commit is contained in:
@ -159,6 +159,7 @@
|
||||
"./apps/tests/pages/page15.ts",
|
||||
"./apps/tests/pages/page16.ts",
|
||||
"./apps/tests/pages/page17.ts",
|
||||
"./apps/tests/pages/page18.ts",
|
||||
"./apps/tests/pages/page5.ts",
|
||||
"./apps/tests/pages/page6.ts",
|
||||
"./apps/tests/pages/page7.ts",
|
||||
@ -176,6 +177,9 @@
|
||||
"./apps/tests/ui-test.ts",
|
||||
"./apps/tests/ui/activity-indicator/activity-indicator-tests.ts",
|
||||
"./apps/tests/ui/bindable-tests.ts",
|
||||
"./apps/tests/ui/bindingContext_testPage.ts",
|
||||
"./apps/tests/ui/bindingContext_testPage1.ts",
|
||||
"./apps/tests/ui/bindingContext_testPage2.ts",
|
||||
"./apps/tests/ui/border/border-tests.ts",
|
||||
"./apps/tests/ui/button/button-tests-native.android.ts",
|
||||
"./apps/tests/ui/button/button-tests-native.d.ts",
|
||||
|
@ -9,6 +9,7 @@ import definition = require("ui/builder/component-builder");
|
||||
import fs = require("file-system");
|
||||
import gestures = require("ui/gestures");
|
||||
import bindingBuilder = require("ui/builder/binding-builder");
|
||||
import platform = require("platform");
|
||||
|
||||
var EVENT = "Event";
|
||||
var UI_PATH = "ui/";
|
||||
@ -76,6 +77,13 @@ export function getComponentModule(elementName: string, namespace: string, attri
|
||||
|
||||
var attrValue = <string>attributes[attr];
|
||||
|
||||
if (attr.indexOf(":") !== -1){
|
||||
var platformName = attr.split(":")[0].trim();
|
||||
if(platformName.toLowerCase() !== platform.device.os.toLowerCase()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (attr.indexOf(".") !== -1) {
|
||||
var subObj = instance;
|
||||
var properties = attr.split(".");
|
||||
|
Reference in New Issue
Block a user