Beispiel #1
0
 def uiview(self, request, context):
     '''Wrap the ``main`` html with a ``ui-view`` container.
     Add animation class if specified in :setting:`ANGULAR_VIEW_ANIMATE`.
     '''
     app = request.app
     main = context.get('html_main', '')
     main = Html('div', main, cn='hidden', id="seo-view")
     div = Html('div', main, cn='angular-view')
     animate = app.config['ANGULAR_VIEW_ANIMATE']
     if animate:
         add_ng_modules(request.html_document, ('ngAnimate',))
         div.addClass(animate)
     div.data('ui-view', 'main')
     return div.render()
Beispiel #2
0
 def uiview(self, request, context):
     '''Wrap the ``main`` html with a ``ui-view`` container.
     Add animation class if specified in :setting:`ANGULAR_VIEW_ANIMATE`.
     '''
     app = request.app
     main = context.get('html_main', '')
     main = Html('div', main, cn='hidden', id="seo-view")
     div = Html('div', main, cn='angular-view')
     animate = app.config['ANGULAR_VIEW_ANIMATE']
     if animate:
         add_ng_modules(request.html_document, ('ngAnimate', ))
         div.addClass(animate)
     div.data('ui-view', 'main')
     return div.render()
Beispiel #3
0
 def state_template(self, app):
     '''Template used when in html5 mode
     '''
     div = Html('div', cn=self.angular_view_class)
     div.data({'compile-html': ''})
     return div.render()
Beispiel #4
0
def state_template(self, app):
    '''Template used when in html5 mode
        '''
    div = Html('div', cn=self.angular_view_class)
    div.data({'compile-html': ''})
    return div.render()