{"action":"closed","issue":{"url":"https://api.github.com/repos/angular-ui/ui-router/issues/2332","repository_url":"https://api.github.com/repos/angular-ui/ui-router","labels_url":"https://api.github.com/repos/angular-ui/ui-router/issues/2332/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/ui-router/issues/2332/comments","events_url":"https://api.github.com/repos/angular-ui/ui-router/issues/2332/events","html_url":"https://github.com/angular-ui/ui-router/issues/2332","id":113157125,"number":2332,"title":"ui-router problem with ckeditor","user":{"login":"smilingGithub","id":15276950,"avatar_url":"https://avatars.githubusercontent.com/u/15276950?v=3","gravatar_id":"","url":"https://api.github.com/users/smilingGithub","html_url":"https://github.com/smilingGithub","followers_url":"https://api.github.com/users/smilingGithub/followers","following_url":"https://api.github.com/users/smilingGithub/following{/other_user}","gists_url":"https://api.github.com/users/smilingGithub/gists{/gist_id}","starred_url":"https://api.github.com/users/smilingGithub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smilingGithub/subscriptions","organizations_url":"https://api.github.com/users/smilingGithub/orgs","repos_url":"https://api.github.com/users/smilingGithub/repos","events_url":"https://api.github.com/users/smilingGithub/events{/privacy}","received_events_url":"https://api.github.com/users/smilingGithub/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-24T12:27:27Z","updated_at":"2016-03-03T21:58:20Z","closed_at":"2016-03-03T21:58:20Z","body":"Hi,\r\nFirst of all please forgive my english :)\r\n\r\nI am now working on a project where angular ui-router is used for page navigation(state stuff). Recently I decided to use ckeditor as well as ng-ckeditor for a module to support user input with style and layout customisation. The problem I found was that when changing from a state ,say, create-item,which conresponds to a view containing ckeditor in it, to another state,say, edit-item, which also contains ckeditor, the create-item view was not properly removed/cleared from the page and the edit-item view was prepended on top of the create-item view resulting in 2 undesired ui-view elements in the page as the following snippet:\r\n\r\n![problem](https://cloud.githubusercontent.com/assets/15276950/10710438/793ad400-7a84-11e5-83e2-1ddb693245bc.jpg)\r\n\r\nThe one with attribute data-ng-animate on it was of create-item view that was supposed to be gone when the render was completed.\r\n\r\nAlso each view uses its own controllers as follows:\r\n\r\n```\r\napp.controller('ItemCreationCtrl', ['$scope','$state',function($scope, $state){\r\n   ...\r\n   $state.go('edit-item', {itemId: id, fromCreate: true});\r\n   ...\r\n}]).controller('ItemUpdateCtrl', ['$scope','$stateParams',function($scope, $stateParams){\r\n    ...\r\n   $scope.itemId = $stateParams.itemId;\r\n   ...\r\n}]);\r\n```\r\n\r\nThe following snippet is the current state configuration:\r\n\r\n```\r\n$stateProvider.state('create-item',{\r\n       url: '/item/new',\r\n       controller:'ItemCreationCtrl',\r\n       templateUrl: modulePath + 'items/views/itemCreate.html'\r\n}).state('edit-item',{\r\n       url: '/item/edit',\r\n       controller:'ItemUpdateCtrl',\r\n       params: {itemId: null, fromCreate: false},\r\n       templateUrl: modulePath + 'items/views/itemEdit.html'\r\n\r\n}) ...\r\n```\r\n\r\nI have no idea how to fix this since I'm quite an ordinary user of javascript let alone angularjs\r\nand besides there was no error loged in firebug console for this problem. However when i removed ckeditor directive(attribute) from the textarea, everything was working fine. I also noticed that when adding the ckeditor directive to the textarea element, angular takes more time to render the page. im not sure if it has anything to do with the problem.\r\n\r\nIm not sure if the problem is from ui-router, ngAnimate, ng-ckeditor, ckeditor or myself :(\r\nPlease help me out, any advice is appreciated.\r\nThank you.\r\n"}}