diff --git a/tests/app/tests/third-party-view.ts b/tests/app/tests/third-party-view.ts new file mode 100644 index 000000000..8b85c2595 --- /dev/null +++ b/tests/app/tests/third-party-view.ts @@ -0,0 +1,7 @@ +import {ContentView} from "ui/content-view"; + +// >> third-party-simple-view +export class SimpleTag extends ContentView { + //... +} +// << third-party-simple-view diff --git a/tests/app/tests/third-party.ts b/tests/app/tests/third-party.ts new file mode 100644 index 000000000..57a86fa03 --- /dev/null +++ b/tests/app/tests/third-party.ts @@ -0,0 +1,114 @@ +//make sure you import mocha-config before angular2/core +import {assert} from "./test-config"; +import {Component, Directive, ElementRef, ViewContainerRef, TemplateRef, Inject} from "angular2/core"; +import {View} from "ui/core/view"; +import {Label} from "ui/label"; +import {TestApp} from "./test-app"; + +// >> third-party-simple-view-registration +import {registerElement} from "nativescript-angular/element-registry"; +registerElement("third-party-view", () => require("./third-party-view").SimpleTag); +// << third-party-simple-view-registration + +// >> third-party-simple-view-container +@Component({ + selector: 'simple-view-container', + template: ` + + ` +}) +export class SimpleViewContainer { +} +// << third-party-simple-view-container +// +// >> third-party-document-form-component +@Component({ + selector: 'document-form', + template: '' +}) +export class DocumentFormComponent { + // >> (hide) + public static titleLabel: Label; + // << (hide) + + constructor() { + } + + public setTitleView(view: View) { + // pass view parameter to native element... + // >> (hide) + DocumentFormComponent.titleLabel =