Init Angular

This commit is contained in:
Bruno SIMON
2016-06-03 18:06:55 +02:00
parent c9e2a20343
commit b61ddb5967
6 changed files with 124 additions and 1 deletions
@@ -0,0 +1,20 @@
var angular_module = angular.module( 'application', [] );
angular_module.controller(
'ApplicationController',
[
'$scope',
'data',
function( $scope, data )
{
console.log(data);
this.pwet = 'uh';
this.codes =
[
{ title: 'Title 1' },
{ title: 'Title 2' }
];
}
]
);
+12
View File
@@ -0,0 +1,12 @@
angular_module.factory(
'data',
[
function()
{
return function()
{
console.log( 'data' );
}
}
]
);