diff --git a/dist/angular-component.js b/dist/angular-component.js index a4d36f6..04ee825 100755 --- a/dist/angular-component.js +++ b/dist/angular-component.js @@ -38,13 +38,13 @@ return { controller: options.controller || angular.noop, - controllerAs: identifierForController(options.controller) || options.controllerAs || name, + controllerAs: identifierForController(options.controller) || options.controllerAs || '$ctrl', template: makeInjectable( !options.template && !options.templateUrl ? '' : options.template ), templateUrl: makeInjectable(options.templateUrl), transclude: options.transclude === undefined ? true : options.transclude, - scope: (options.isolate === false ? true : (options.bindings || {})), + scope: {}, bindToController: !!options.bindings, restrict: options.restrict || 'E' }; diff --git a/dist/angular-component.min.js b/dist/angular-component.min.js index 8ed4380..aeace54 100755 --- a/dist/angular-component.min.js +++ b/dist/angular-component.min.js @@ -1,2 +1,2 @@ /*! angular-component v0.0.2 | (c) 2016 @toddmotto | https://github.com/toddmotto/angular-component */ -!function(){function t(t,n){if(n&&"string"==typeof n)return n;if("string"==typeof t){var e=/^(\S+)(\s+as\s+(\w+))?$/.exec(t);if(e)return e[3]}}function n(){function n(n,e){function o(r){function o(t){return angular.isFunction(t)?function(n,e){return r.invoke(t,this,{$element:n,$attrs:e})}:t}return{controller:e.controller||angular.noop,controllerAs:t(e.controller)||e.controllerAs||n,template:o(e.template||e.templateUrl?e.template:""),templateUrl:o(e.templateUrl),transclude:void 0===e.transclude?!0:e.transclude,scope:e.isolate===!1?!0:e.bindings||{},bindToController:!!e.bindings,restrict:e.restrict||"E"}}return e.$canActivate&&(o.$canActivate=e.$canActivate),e.$routeConfig&&(o.$routeConfig=e.$routeConfig),o.$inject=["$injector"],r.directive(n,o)}var r=e.apply(this,arguments);return r.component?r:(r.component=n,r)}var e=angular.module;angular.module=n}(); \ No newline at end of file +!function(){function t(t,n){if(n&&"string"==typeof n)return n;if("string"==typeof t){var e=/^(\S+)(\s+as\s+(\w+))?$/.exec(t);if(e)return e[3]}}function n(){function n(n,e){function o(n){function r(t){return angular.isFunction(t)?function(e,r){return n.invoke(t,this,{$element:e,$attrs:r})}:t}return{controller:e.controller||angular.noop,controllerAs:t(e.controller)||e.controllerAs||"$ctrl",template:r(e.template||e.templateUrl?e.template:""),templateUrl:r(e.templateUrl),transclude:void 0===e.transclude?!0:e.transclude,scope:{},bindToController:!!e.bindings,restrict:e.restrict||"E"}}return e.$canActivate&&(o.$canActivate=e.$canActivate),e.$routeConfig&&(o.$routeConfig=e.$routeConfig),o.$inject=["$injector"],r.directive(n,o)}var r=e.apply(this,arguments);return r.component?r:(r.component=n,r)}var e=angular.module;angular.module=n}(); \ No newline at end of file diff --git a/src/angular-component.js b/src/angular-component.js index 1fecaae..35aba80 100755 --- a/src/angular-component.js +++ b/src/angular-component.js @@ -37,13 +37,13 @@ return { controller: options.controller || angular.noop, - controllerAs: identifierForController(options.controller) || options.controllerAs || name, + controllerAs: identifierForController(options.controller) || options.controllerAs || '$ctrl', template: makeInjectable( !options.template && !options.templateUrl ? '' : options.template ), templateUrl: makeInjectable(options.templateUrl), transclude: options.transclude === undefined ? true : options.transclude, - scope: (options.isolate === false ? true : (options.bindings || {})), + scope: {}, bindToController: !!options.bindings, restrict: options.restrict || 'E' };