# Can't import view

**URL:** <https://meta.discourse.org/t/cant-import-view/50402>\
**Category:** Development\
**Created:** [September 20, 2016, 6:27pm UTC](https://meta.discourse.org/t/cant-import-view/50402 "2016-09-20T18:27:19Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![sevenmaxis](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@sevenmaxis](https://meta.discourse.org/u/sevenmaxis)\
**Post date:** [September 20, 2016, 8:58pm UTC](https://meta.discourse.org/t/cant-import-view/50402/6 "2016-09-20T20:58:53Z")

</div>

No difference.  
I found another weirdo, here’s bigger snippet:

```
import PostModel from 'discourse/models/post';
import { withPluginApi } from 'discourse/lib/plugin-api';
import { slot, loadGoogle } from '../lib/gpt';
import TopicView from 'discourse/views/topic';
// here TopicView is defined
export default {
  name: 'initialize-ad-plugin',
  initialize(container) {
    PostModel.reopen({
    ...
    })
    ...
    // but here TopicView is not defined
    ...
  }
}

```

TopicView is accessible out of anonymous object, but not inside it. But i don’t understand why there’s no problem with PostModel?

---

_[View the full topic](https://meta.discourse.org/t/cant-import-view/50402)._
