Connect data

This commit is contained in:
brunosimon
2016-06-05 01:14:23 +02:00
parent b61ddb5967
commit c8d111cf5c
10 changed files with 261 additions and 164 deletions
@@ -4,17 +4,20 @@ angular_module.controller(
'ApplicationController',
[
'$scope',
'data',
function( $scope, data )
'project',
function( $scope, project )
{
console.log(data);
var that = this;
this.pwet = 'uh';
this.codes =
[
{ title: 'Title 1' },
{ title: 'Title 2' }
];
project.on_update( function( data )
{
$scope.$apply( function()
{
that.project = data;
} );
} );
this.project = project.data;
}
]
);