You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cd...@apache.org on 2017/02/15 12:24:28 UTC

[3/3] git commit: [flex-asjs] [refs/heads/develop] - - Made 2 of the 3 examples in "native" build with maven (could require adjustment of the Ant build because of refactoring of the directory structure)

- Made 2 of the 3 examples in "native" build with maven (could require adjustment of the Ant build because of refactoring of the directory structure)


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/de0cca78
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/de0cca78
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/de0cca78

Branch: refs/heads/develop
Commit: de0cca788599b912976519940209ae5a66263832
Parents: 3e284d0
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Wed Feb 15 13:24:17 2017 +0100
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Wed Feb 15 13:24:17 2017 +0100

----------------------------------------------------------------------
 .../native/AngularExample/src/AngularExample.as |  84 -----------
 .../native/AngularExample/src/MyController.as   |  70 ----------
 .../src/components/IWebComponent.as             |  27 ----
 .../src/components/WebComponent.as              |  38 -----
 .../src/components/mdbutton/MDButton.as         |  61 --------
 .../src/components/mdbutton/MDButtonFactory.as  |  56 --------
 .../src/main/flex/AngularExample.as             |  84 +++++++++++
 .../src/main/flex/MyController.as               |  70 ++++++++++
 .../src/main/flex/components/IWebComponent.as   |  27 ++++
 .../src/main/flex/components/WebComponent.as    |  38 +++++
 .../main/flex/components/mdbutton/MDButton.as   |  61 ++++++++
 .../flex/components/mdbutton/MDButtonFactory.as |  56 ++++++++
 examples/native/ButtonExample/pom.xml           |  12 +-
 examples/native/USStatesMap/pom.xml             |  24 ++++
 examples/native/USStatesMap/src/MapCoords.as    |  75 ----------
 examples/native/USStatesMap/src/USStatesMap.as  | 140 -------------------
 .../USStatesMap/src/main/flex/MapCoords.as      |  75 ++++++++++
 .../USStatesMap/src/main/flex/USStatesMap.as    | 140 +++++++++++++++++++
 examples/native/pom.xml                         |   2 +-
 examples/pom.xml                                |   2 +-
 20 files changed, 580 insertions(+), 562 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/de0cca78/examples/native/AngularExample/src/AngularExample.as
----------------------------------------------------------------------
diff --git a/examples/native/AngularExample/src/AngularExample.as b/examples/native/AngularExample/src/AngularExample.as
deleted file mode 100644
index 6bc74c9..0000000
--- a/examples/native/AngularExample/src/AngularExample.as
+++ /dev/null
@@ -1,84 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package {
-	import angular.IModule;
-
-	import components.mdbutton.MDButton;
-	import components.mdbutton.MDButtonFactory;
-	/**
-	 * @author omuppirala
-	 */
-	public class AngularExample {
-		
-		private var app:IModule;
-		
-		public function AngularExample() {
-			//set up angular app
-			app = angular.module("app",["ngMaterial"]);
-			app.controller("MyController", ["$scope", "$mdDialog", MyController]);
-			document.body.setAttribute("ng-app", "app");
-			
-			//App container
-			var container:HTMLDivElement = document.createElement('div') as HTMLDivElement;
-			container.style.width = '100%';
-			container.style.height = '100%';
-			container.setAttribute("layout", "row");
-			container.setAttribute("layout-align", "center center");
-			document.body.appendChild(container);
-			
-			//App
-			var div:HTMLDivElement = document.createElement('div') as HTMLDivElement;
-			div.id = 'div';
-			div.style.width = '50%';
-			div.style.height = '50%';
-			div.setAttribute("layout", "column");
-			div.setAttribute("layout-align", "center center");
-			
-			div.setAttribute("ng-controller", "MyController");
-			div.setAttribute("md-whiteframe", "18");
-			div.setAttribute("class", "md-whiteframe-14dp");
-			container.appendChild(div);
-			
-			//App children
-			div.innerHTML = '<h1>FlexJS + Angular + Angular Material Demo</h1>';
-			div.innerHTML += '<span flex />';
-			div.innerHTML += '<md-button id="myBtn" class="md-primary md-raised" ng-click="handleBtnClick()">{{btnLabelStr}}</md-button>';
-//			div.innerHTML += '<md-datepicker ng-model="myDate" md-placeholder="Enter date"></md-datepicker>';
-//			div.innerHTML += '<md-progress-circular md-mode="indeterminate"></md-progress-circular>';
-			div.innerHTML += '<md-input-container class="md-block" flex-gt-sm><label>Change button label...</label><input ng-model="btnLabelStr"></md-input-container>';
-			div.innerHTML += '<span flex />';
-
-//			var labelButtonClass:Object = MDButtonFactory.getInstance().getButtonClass();
-//			var labelButton:MDButton = new labelButtonClass();
-//			labelButton.setAttribute("class", "md-primary md-raised");
-//			div.appendChild(labelButton);
-//			labelButton.setLabel("Label Button");
-			
-//			var cakeButtonClass:Object = MDButtonFactory.getInstance().getButtonClass();
-//			var cakeButton:MDButton = new cakeButtonClass();
-//			cakeButton.setAttribute("class", "md-fab");
-//			//cakeButton.setAttribute("md-no-ink", "");
-//			div.appendChild(cakeButton);
-//			cakeButton.setIcon("cake");
-//			cakeButton.clickHandler("handleBtnClick");
-			
-		}
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/de0cca78/examples/native/AngularExample/src/MyController.as
----------------------------------------------------------------------
diff --git a/examples/native/AngularExample/src/MyController.as b/examples/native/AngularExample/src/MyController.as
deleted file mode 100644
index 295df23..0000000
--- a/examples/native/AngularExample/src/MyController.as
+++ /dev/null
@@ -1,70 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package {
-	import angular.material.MDAlertDialog;
-	import angular.material.MDDialogService;
-	import angular.IScope;
-	/**
-	 * @author omuppirala
-	 */
-	 
-	public class MyController {
-		
-		private var $scope:IScope;
-		private var $mdDialog:MDDialogService;
-		
-		public function MyController(scope:IScope,mdDialog:MDDialogService) {
-			this.$scope = scope;
-			this.$mdDialog = mdDialog;
-			this.$scope["handleBtnClick"] = this.handleBtnClick;
-			this.$scope["close"] = this.close;
-			this.$scope["myDate"] = new Date();
-			this.$scope["btnLabelStr"] = "Click me";
-
-			//setupWatchForDate();
-		}
-
-		private function setupWatchForDate() : void {
-			$scope.$watch('myDate', this.handleDateChange,true);
-		}
-
-		private function handleDateChange() : void {
-			alert('Date selected: ' + $scope["myDate"].toString());
-		}
-		
-		public function handleBtnClick(event:Event):void
-		{
-			$mdDialog.show(
-			{
-				scope: $scope,
-				preserveScope: true,
-      			//template: '<div style="margin:25px;"><img src="http://flex.apache.org/images/logo_01_fullcolor-sm.png" alt=""/><h1 md-heading">Angular Material</h1><img src="https://material.angularjs.org/latest/img/icons/angular-logo.svg" alt=""/><div layout="row"><span flex/><md-button ng-click=close()>CLOSE</md-button></div></div>',
-      			template: '<div layout="column" layout-align="left center" style="width:500px; height:500px; margin:25px;"><h3>Select a date: </h3><md-datepicker ng-model="myDate" md-placeholder="Enter date"></md-datepicker><br>Selected date: {{myDate}}<span flex/><div layout="row"><span flex/><md-button ng-click=close()>CLOSE</md-button></div></div>',
-			    clickOutsideToClose: true,
-				openFrom: angular.element(document.querySelector('#myBtn')),
-				closeTo: angular.element(document.querySelector('#myBtn'))
-		    });
-		}
-		
-		private function close():void
-		{
-			$mdDialog.cancel();
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/de0cca78/examples/native/AngularExample/src/components/IWebComponent.as
----------------------------------------------------------------------
diff --git a/examples/native/AngularExample/src/components/IWebComponent.as b/examples/native/AngularExample/src/components/IWebComponent.as
deleted file mode 100644
index ca0e8ca..0000000
--- a/examples/native/AngularExample/src/components/IWebComponent.as
+++ /dev/null
@@ -1,27 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package components {
-	/**
-	 * @author omuppirala
-	 */
-	public interface IWebComponent {
-		
-		function setupComponent():void;
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/de0cca78/examples/native/AngularExample/src/components/WebComponent.as
----------------------------------------------------------------------
diff --git a/examples/native/AngularExample/src/components/WebComponent.as b/examples/native/AngularExample/src/components/WebComponent.as
deleted file mode 100644
index 3637fd2..0000000
--- a/examples/native/AngularExample/src/components/WebComponent.as
+++ /dev/null
@@ -1,38 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package components {
-	import components.IWebComponent;
-
-	/**
-	 * @author omuppirala
-	 */
-	public class WebComponent extends HTMLElement implements IWebComponent {
-
-		protected var sr : ShadowRoot;
-
-		public function createdCallback() : void {
-			sr = this['createShadowRoot']();
-			setupComponent();
-		}
-
-		public function setupComponent() : void {
-			//override in subclass
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/de0cca78/examples/native/AngularExample/src/components/mdbutton/MDButton.as
----------------------------------------------------------------------
diff --git a/examples/native/AngularExample/src/components/mdbutton/MDButton.as b/examples/native/AngularExample/src/components/mdbutton/MDButton.as
deleted file mode 100644
index 05f9377..0000000
--- a/examples/native/AngularExample/src/components/mdbutton/MDButton.as
+++ /dev/null
@@ -1,61 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package components.mdbutton {
-	import components.WebComponent;
-	/**
-	 * @author omuppirala
-	 */
-	public class MDButton extends WebComponent
-	{
-		
-		protected var label:Text;
-		protected var iconSpan:HTMLSpanElement;
-		override public function setupComponent():void {
-			createLabel();
-			createIcon();
-		}
-		
-		protected function createLabel():void
-		{
-			label = ownerDocument.createTextNode("");
-    		sr.appendChild(Node(label));
-		}
-		
-		public function setLabel(labelStr:String):void {
-			this.textContent = labelStr;
-		}
-		
-		protected function createIcon():void
-		{
-			iconSpan = ownerDocument.createElement("span") as HTMLSpanElement;
-			iconSpan.setAttribute("class","material-icons");
-    		this.appendChild(iconSpan);
-		}
-		
-		public function setIcon(iconName:String):void {
-			iconSpan.textContent = iconName;
-		}
-		
-		public function clickHandler(functionName:String):void
-		{
-			this.setAttribute("ng-click", functionName+"()");
-		}
-		
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/de0cca78/examples/native/AngularExample/src/components/mdbutton/MDButtonFactory.as
----------------------------------------------------------------------
diff --git a/examples/native/AngularExample/src/components/mdbutton/MDButtonFactory.as b/examples/native/AngularExample/src/components/mdbutton/MDButtonFactory.as
deleted file mode 100644
index 39b47cb..0000000
--- a/examples/native/AngularExample/src/components/mdbutton/MDButtonFactory.as
+++ /dev/null
@@ -1,56 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package components.mdbutton {
-	public class MDButtonFactory {
-		private static var _instance : MDButtonFactory;
-		protected var elementName : String = "md-button";
-		protected var baseComponent : Object = MDButton;
-		protected var componentClass : Object;
-		protected var alreadyRegistered: Boolean = false;
-
-		public function MDButtonFactory() {
-			if (_instance) {
-				throw new Error("MDButtonFactory is a singleton. Use getInstance instead.");
-			}
-			_instance = this;
-		}
-
-		public static function	getInstance() : MDButtonFactory {
-			if (!_instance) {
-				new MDButtonFactory();
-			}
-			return _instance;
-		}
-		
-		protected function registerComponent() : void {
-			if(!alreadyRegistered)
-			{
-				var classProto:Object = Object["create"](components.mdbutton.MDButton['prototype']);
-				componentClass = document["registerElement"](elementName, {'prototype':classProto});
-				alreadyRegistered = true;
-			}
-		}
-		
-		public function getButtonClass():Object
-		{
-			registerComponent();
-			return componentClass;	
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/de0cca78/examples/native/AngularExample/src/main/flex/AngularExample.as
----------------------------------------------------------------------
diff --git a/examples/native/AngularExample/src/main/flex/AngularExample.as b/examples/native/AngularExample/src/main/flex/AngularExample.as
new file mode 100644
index 0000000..6bc74c9
--- /dev/null
+++ b/examples/native/AngularExample/src/main/flex/AngularExample.as
@@ -0,0 +1,84 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package {
+	import angular.IModule;
+
+	import components.mdbutton.MDButton;
+	import components.mdbutton.MDButtonFactory;
+	/**
+	 * @author omuppirala
+	 */
+	public class AngularExample {
+		
+		private var app:IModule;
+		
+		public function AngularExample() {
+			//set up angular app
+			app = angular.module("app",["ngMaterial"]);
+			app.controller("MyController", ["$scope", "$mdDialog", MyController]);
+			document.body.setAttribute("ng-app", "app");
+			
+			//App container
+			var container:HTMLDivElement = document.createElement('div') as HTMLDivElement;
+			container.style.width = '100%';
+			container.style.height = '100%';
+			container.setAttribute("layout", "row");
+			container.setAttribute("layout-align", "center center");
+			document.body.appendChild(container);
+			
+			//App
+			var div:HTMLDivElement = document.createElement('div') as HTMLDivElement;
+			div.id = 'div';
+			div.style.width = '50%';
+			div.style.height = '50%';
+			div.setAttribute("layout", "column");
+			div.setAttribute("layout-align", "center center");
+			
+			div.setAttribute("ng-controller", "MyController");
+			div.setAttribute("md-whiteframe", "18");
+			div.setAttribute("class", "md-whiteframe-14dp");
+			container.appendChild(div);
+			
+			//App children
+			div.innerHTML = '<h1>FlexJS + Angular + Angular Material Demo</h1>';
+			div.innerHTML += '<span flex />';
+			div.innerHTML += '<md-button id="myBtn" class="md-primary md-raised" ng-click="handleBtnClick()">{{btnLabelStr}}</md-button>';
+//			div.innerHTML += '<md-datepicker ng-model="myDate" md-placeholder="Enter date"></md-datepicker>';
+//			div.innerHTML += '<md-progress-circular md-mode="indeterminate"></md-progress-circular>';
+			div.innerHTML += '<md-input-container class="md-block" flex-gt-sm><label>Change button label...</label><input ng-model="btnLabelStr"></md-input-container>';
+			div.innerHTML += '<span flex />';
+
+//			var labelButtonClass:Object = MDButtonFactory.getInstance().getButtonClass();
+//			var labelButton:MDButton = new labelButtonClass();
+//			labelButton.setAttribute("class", "md-primary md-raised");
+//			div.appendChild(labelButton);
+//			labelButton.setLabel("Label Button");
+			
+//			var cakeButtonClass:Object = MDButtonFactory.getInstance().getButtonClass();
+//			var cakeButton:MDButton = new cakeButtonClass();
+//			cakeButton.setAttribute("class", "md-fab");
+//			//cakeButton.setAttribute("md-no-ink", "");
+//			div.appendChild(cakeButton);
+//			cakeButton.setIcon("cake");
+//			cakeButton.clickHandler("handleBtnClick");
+			
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/de0cca78/examples/native/AngularExample/src/main/flex/MyController.as
----------------------------------------------------------------------
diff --git a/examples/native/AngularExample/src/main/flex/MyController.as b/examples/native/AngularExample/src/main/flex/MyController.as
new file mode 100644
index 0000000..295df23
--- /dev/null
+++ b/examples/native/AngularExample/src/main/flex/MyController.as
@@ -0,0 +1,70 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package {
+	import angular.material.MDAlertDialog;
+	import angular.material.MDDialogService;
+	import angular.IScope;
+	/**
+	 * @author omuppirala
+	 */
+	 
+	public class MyController {
+		
+		private var $scope:IScope;
+		private var $mdDialog:MDDialogService;
+		
+		public function MyController(scope:IScope,mdDialog:MDDialogService) {
+			this.$scope = scope;
+			this.$mdDialog = mdDialog;
+			this.$scope["handleBtnClick"] = this.handleBtnClick;
+			this.$scope["close"] = this.close;
+			this.$scope["myDate"] = new Date();
+			this.$scope["btnLabelStr"] = "Click me";
+
+			//setupWatchForDate();
+		}
+
+		private function setupWatchForDate() : void {
+			$scope.$watch('myDate', this.handleDateChange,true);
+		}
+
+		private function handleDateChange() : void {
+			alert('Date selected: ' + $scope["myDate"].toString());
+		}
+		
+		public function handleBtnClick(event:Event):void
+		{
+			$mdDialog.show(
+			{
+				scope: $scope,
+				preserveScope: true,
+      			//template: '<div style="margin:25px;"><img src="http://flex.apache.org/images/logo_01_fullcolor-sm.png" alt=""/><h1 md-heading">Angular Material</h1><img src="https://material.angularjs.org/latest/img/icons/angular-logo.svg" alt=""/><div layout="row"><span flex/><md-button ng-click=close()>CLOSE</md-button></div></div>',
+      			template: '<div layout="column" layout-align="left center" style="width:500px; height:500px; margin:25px;"><h3>Select a date: </h3><md-datepicker ng-model="myDate" md-placeholder="Enter date"></md-datepicker><br>Selected date: {{myDate}}<span flex/><div layout="row"><span flex/><md-button ng-click=close()>CLOSE</md-button></div></div>',
+			    clickOutsideToClose: true,
+				openFrom: angular.element(document.querySelector('#myBtn')),
+				closeTo: angular.element(document.querySelector('#myBtn'))
+		    });
+		}
+		
+		private function close():void
+		{
+			$mdDialog.cancel();
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/de0cca78/examples/native/AngularExample/src/main/flex/components/IWebComponent.as
----------------------------------------------------------------------
diff --git a/examples/native/AngularExample/src/main/flex/components/IWebComponent.as b/examples/native/AngularExample/src/main/flex/components/IWebComponent.as
new file mode 100644
index 0000000..ca0e8ca
--- /dev/null
+++ b/examples/native/AngularExample/src/main/flex/components/IWebComponent.as
@@ -0,0 +1,27 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package components {
+	/**
+	 * @author omuppirala
+	 */
+	public interface IWebComponent {
+		
+		function setupComponent():void;
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/de0cca78/examples/native/AngularExample/src/main/flex/components/WebComponent.as
----------------------------------------------------------------------
diff --git a/examples/native/AngularExample/src/main/flex/components/WebComponent.as b/examples/native/AngularExample/src/main/flex/components/WebComponent.as
new file mode 100644
index 0000000..3637fd2
--- /dev/null
+++ b/examples/native/AngularExample/src/main/flex/components/WebComponent.as
@@ -0,0 +1,38 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package components {
+	import components.IWebComponent;
+
+	/**
+	 * @author omuppirala
+	 */
+	public class WebComponent extends HTMLElement implements IWebComponent {
+
+		protected var sr : ShadowRoot;
+
+		public function createdCallback() : void {
+			sr = this['createShadowRoot']();
+			setupComponent();
+		}
+
+		public function setupComponent() : void {
+			//override in subclass
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/de0cca78/examples/native/AngularExample/src/main/flex/components/mdbutton/MDButton.as
----------------------------------------------------------------------
diff --git a/examples/native/AngularExample/src/main/flex/components/mdbutton/MDButton.as b/examples/native/AngularExample/src/main/flex/components/mdbutton/MDButton.as
new file mode 100644
index 0000000..05f9377
--- /dev/null
+++ b/examples/native/AngularExample/src/main/flex/components/mdbutton/MDButton.as
@@ -0,0 +1,61 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package components.mdbutton {
+	import components.WebComponent;
+	/**
+	 * @author omuppirala
+	 */
+	public class MDButton extends WebComponent
+	{
+		
+		protected var label:Text;
+		protected var iconSpan:HTMLSpanElement;
+		override public function setupComponent():void {
+			createLabel();
+			createIcon();
+		}
+		
+		protected function createLabel():void
+		{
+			label = ownerDocument.createTextNode("");
+    		sr.appendChild(Node(label));
+		}
+		
+		public function setLabel(labelStr:String):void {
+			this.textContent = labelStr;
+		}
+		
+		protected function createIcon():void
+		{
+			iconSpan = ownerDocument.createElement("span") as HTMLSpanElement;
+			iconSpan.setAttribute("class","material-icons");
+    		this.appendChild(iconSpan);
+		}
+		
+		public function setIcon(iconName:String):void {
+			iconSpan.textContent = iconName;
+		}
+		
+		public function clickHandler(functionName:String):void
+		{
+			this.setAttribute("ng-click", functionName+"()");
+		}
+		
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/de0cca78/examples/native/AngularExample/src/main/flex/components/mdbutton/MDButtonFactory.as
----------------------------------------------------------------------
diff --git a/examples/native/AngularExample/src/main/flex/components/mdbutton/MDButtonFactory.as b/examples/native/AngularExample/src/main/flex/components/mdbutton/MDButtonFactory.as
new file mode 100644
index 0000000..39b47cb
--- /dev/null
+++ b/examples/native/AngularExample/src/main/flex/components/mdbutton/MDButtonFactory.as
@@ -0,0 +1,56 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package components.mdbutton {
+	public class MDButtonFactory {
+		private static var _instance : MDButtonFactory;
+		protected var elementName : String = "md-button";
+		protected var baseComponent : Object = MDButton;
+		protected var componentClass : Object;
+		protected var alreadyRegistered: Boolean = false;
+
+		public function MDButtonFactory() {
+			if (_instance) {
+				throw new Error("MDButtonFactory is a singleton. Use getInstance instead.");
+			}
+			_instance = this;
+		}
+
+		public static function	getInstance() : MDButtonFactory {
+			if (!_instance) {
+				new MDButtonFactory();
+			}
+			return _instance;
+		}
+		
+		protected function registerComponent() : void {
+			if(!alreadyRegistered)
+			{
+				var classProto:Object = Object["create"](components.mdbutton.MDButton['prototype']);
+				componentClass = document["registerElement"](elementName, {'prototype':classProto});
+				alreadyRegistered = true;
+			}
+		}
+		
+		public function getButtonClass():Object
+		{
+			registerComponent();
+			return componentClass;	
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/de0cca78/examples/native/ButtonExample/pom.xml
----------------------------------------------------------------------
diff --git a/examples/native/ButtonExample/pom.xml b/examples/native/ButtonExample/pom.xml
index ea0080e..5dbbece 100644
--- a/examples/native/ButtonExample/pom.xml
+++ b/examples/native/ButtonExample/pom.xml
@@ -35,19 +35,13 @@
   <name>Apache Flex - FlexJS: Examples: Native: ButtonExample</name>
 
   <build>
-    <sourceDirectory>src/main/flex</sourceDirectory>
-    <resources>
-      <resource>
-        <directory>src/main/resources</directory>
-        <filtering>true</filtering>
-      </resource>
-    </resources>
     <plugins>
       <plugin>
         <groupId>org.apache.flex.flexjs.compiler</groupId>
         <artifactId>flexjs-maven-plugin</artifactId>
         <extensions>true</extensions>
         <configuration>
+          <outputJavaScript>true</outputJavaScript>
           <mainClass>ButtonExample.as</mainClass>
         </configuration>
       </plugin>
@@ -65,7 +59,7 @@
   <dependencies>
     
     <!-- Needed for Flash compilation -->
-    <dependency>
+    <!--dependency>
       <groupId>com.adobe.flash.framework</groupId>
       <artifactId>playerglobal</artifactId>
       <version>20.0</version>
@@ -78,7 +72,7 @@
       <version>${air.version}</version>
       <type>swc</type>
       <scope>provided</scope>
-    </dependency>
+    </dependency-->
 
     <dependency>
       <groupId>org.apache.flex.flexjs.typedefs</groupId>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/de0cca78/examples/native/USStatesMap/pom.xml
----------------------------------------------------------------------
diff --git a/examples/native/USStatesMap/pom.xml b/examples/native/USStatesMap/pom.xml
index 8f4540d..efee76c 100644
--- a/examples/native/USStatesMap/pom.xml
+++ b/examples/native/USStatesMap/pom.xml
@@ -42,13 +42,37 @@
         <version>${flexjs.compiler.version}</version>
         <extensions>true</extensions>
         <configuration>
+          <outputJavaScript>true</outputJavaScript>
           <mainClass>USStatesMap.as</mainClass>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+      </plugin>
     </plugins>
   </build>
 
   <dependencies>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.typedefs</groupId>
+      <artifactId>flexjs-typedefs-js</artifactId>
+      <version>${flexjs.typedefs.version}</version>
+      <type>swc</type>
+      <classifier>typedefs</classifier>
+      <scope>runtime</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>Language</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <type>swc</type>
+    </dependency>
   </dependencies>
 
 </project>