Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

md-tabs: model.assign is not a function #3537

Closed
ghost opened this issue Jul 1, 2015 · 5 comments
Closed

md-tabs: model.assign is not a function #3537

ghost opened this issue Jul 1, 2015 · 5 comments
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Jul 1, 2015

Did a bower update from master and my tabs broke. Looks like the tabs demo is also broken.
Not using a ngModel anywhere on tabs.

TypeError: model.assign is not a function
    at http://localhost:3000/bower_components/angular-material/angular-material.js:15382:22
    at MdTabsController.Object.defineProperty.set (http://localhost:3000/bower_components/angular-material/angular-material.js:15741:20)
    at init (http://localhost:3000/bower_components/angular-material/angular-material.js:15339:24)
    at new MdTabsController (http://localhost:3000/bower_components/angular-material/angular-material.js:15333:3)
    at Object.invoke (http://localhost:3000/bower_components/angular/angular.js:4443:17)
    at ident.$get.extend.instance (http://localhost:3000/bower_components/angular/angular.js:8991:34)
    at nodeLinkFn (http://localhost:3000/bower_components/angular/angular.js:8101:36)
    at compositeLinkFn (http://localhost:3000/bower_components/angular/angular.js:7534:13)
    at nodeLinkFn (http://localhost:3000/bower_components/angular/angular.js:8137:24)
    at compositeLinkFn (http://localhost:3000/bower_components/angular/angular.js:7534:13) <ui-view layout="column" layout-fill="" flex="" style="max-height: 100%" class="ng-scope">(anonymous function) @ angular.js:12314ident.$get @ angular.js:9101invokeLinkFn @ angular.js:8644nodeLinkFn @ angular.js:8142compositeLinkFn @ angular.js:7534publicLinkFn @ angular.js:7409updateView @ angular-ui-router.js:3959(anonymous function) @ angular-ui-router.js:3921parent.$get.Scope.$broadcast @ angular.js:16149$state.transitionTo.$state.transition.resolved.then.$state.transition @ angular-ui-router.js:3311processQueue @ angular.js:14551(anonymous function) @ angular.js:14567parent.$get.Scope.$eval @ angular.js:15830parent.$get.Scope.$digest @ angular.js:15641parent.$get.Scope.$apply @ angular.js:15935done @ angular.js:10356completeRequest @ angular.js:10528requestLoaded @ angular.js:10469
angular.js:12314 TypeError: model.assign is not a function
    at angular-material.js:15382
    at MdTabsController.Object.defineProperty.set (angular-material.js:15741)
    at Object.<anonymous> (angular-material.js:15388)
    at Object.constantListener [as fn] (angular.js:14196)
    at Scope.parent.$get.Scope.$digest (angular.js:15667)
    at Scope.parent.$get.Scope.$apply (angular.js:15935)
    at done (angular.js:10356)
    at completeRequest (angular.js:10528)
    at XMLHttpRequest.requestLoaded (angular.js:10469)
ghost referenced this issue Jul 1, 2015
removes unnecessary $attrs.$observe
utilizes $normalize for attr generation

Closes #3521.
@robertmesserle
Copy link
Contributor

@robertbaker Can you provide a CodePen or some way for me to see this failing? Also, what version of Angular and what browser? I'm not able to recreate this error.

@robertmesserle robertmesserle added this to the 0.10.1 milestone Jul 1, 2015
@robertmesserle robertmesserle self-assigned this Jul 1, 2015
@robertmesserle robertmesserle added type: bug in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs labels Jul 1, 2015
@robertmesserle
Copy link
Contributor

@robertbaker Do you have md-selected as an empty attribute in your md-tabs code? If so, this is the cause.

@robertmesserle
Copy link
Contributor

Closing for now, will re-open with demo.

robertmesserle pushed a commit that referenced this issue Jul 1, 2015
@ghost
Copy link
Author

ghost commented Jul 1, 2015

@robertmesserle ~~~I have md-selected="1", removed it and it works. According to docs, it should be an integer. I tried "'1'", didn't work. I don't have a controller on this view (not needed).~~~

Also go to the master demo site, go to md-tabs demo. Now switch to a directive using the md-select dropdown. Page doesn't change but appears to, refresh browser, see correct page.

@robertmesserle
Copy link
Contributor

Ah, thanks for pointing that out! This was experimental, so I'm going to switch back to the previous method for now.

Edit: Actually, looking into this now, it does not seem to be related to any recent changes. Trying to track down the commit that caused this issue now.

robertmesserle pushed a commit that referenced this issue Jul 4, 2015
@ThomasBurleson ThomasBurleson removed the in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs label Jan 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants