Как получть отбъект из фабрики?
Немного не понятно, как получать помещенное в фабрику...
Подскажите, как это сделать, а то я никак не могу найти.. |
А просто new не подходит? ob=new Fabric()
|
|
nerv_, Спасибо!
Цитата:
|
Service по умолчанию возвращает новый инстанс.
myApp.factory('unicornLauncher', ["apiToken", function(apiToken) { return new UnicornLauncher(apiToken); }]); This is, however, exactly the use-case that Service recipe is the most suitable for. The Service recipe produces a service just like the Value or Factory recipes, but it does so by invoking a constructor with the new operator. |
|
Часовой пояс GMT +3, время: 23:19. |