Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed registerControllerDecorator for Angular v1.3.
Added a simple demo
- Loading branch information
Marc J. Schmidt
committed
Nov 5, 2014
1 parent
97e8a56
commit aae933b
Showing
6 changed files
with
57 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
app: app.js * | ||
traceur app.js controller/* --experimental --out build-script.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import {registerControllerDecorator} from '../registry'; | ||
|
||
var myApp = window.angular.module('myApp', []); | ||
registerControllerDecorator(myApp); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "demo", | ||
"version": "0.0.0", | ||
"homepage": "https://github.com/marcj/angular-es6-annotations", | ||
"authors": [ | ||
"Marc J. Schmidt <marc@jarves.io>" | ||
], | ||
"license": "MIT", | ||
"private": true, | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"test", | ||
"tests" | ||
], | ||
"dependencies": { | ||
"traceur-runtime": "~0.0.72" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import {Inject} from '../../annotations'; | ||
|
||
@Inject('$scope') | ||
export default class MyController { | ||
constructor($scope) { | ||
$scope.name = 'MyController'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!doctype html> | ||
<html ng-app="myApp"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Demo</title> | ||
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.1/angular.js"></script> | ||
<script src="./bower_components/traceur-runtime/traceur-runtime.js"></script> | ||
<script src="./build-script.js"></script> | ||
</head> | ||
<body> | ||
<div ng-controller="controller/MyController"> | ||
Hi my name is {{name}}. | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters