Failed attempt to call factory via directive