@machei wrote:
Hey, how to inject $element from controller?
angular.module('xyz') .controller('ArticlesCtrl', function ($element) { console.log($element); });
Cause error:
Error: [$injector:unpr] Unknown provider: $elementProvider <- $element <- ArticlesCtrl http://errors.angularjs.org/1.3.13/$injector/unpr?p0=%24elementProvider%20%3C-%20%24element%20%3C-%20ArticlesCtrl at REGEX_STRING_REGEXP (file:///android_asset/www/lib/ionic/release/js/ionic.bundle.js:8890:12) at file:///android_asset/www/lib/ionic/release/js/ionic.bundle.js:12824:19 at Object.getService [as get] (file:///android_asset/www/lib/ionic/release/js/ionic.bundle.js:12971:39) at file:///android_asset/www/lib/ionic/release/js/ionic.bundle.js:12829:45 at getService (file:///android_asset/www/lib/ionic/release/js/ionic.bundle.js:12971:39) at invoke (file:///android_asset/www/lib/ionic/release/js/ionic.bundle.js:13003:13) at Object.instantiate (file:///android_asset/www/lib/ionic/release/js/ionic.bundle.js:13020:27) at file:///android_asset/www/lib/ionic/release/js/ionic.bundle.js:17289:28 at IonicModule.controller.self.appendViewElement (file:///android_asset/www/lib/ionic/release/js/ionic.bundle.js:48436:24) at Object.IonicModule.factory.ionicViewSwitcher.create.switcher.render (file:///android_asset/www/lib/ionic/release/js/ionic.bundle.js:46630:41)
Posts: 1
Participants: 1