The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Angular Directive Problem

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #200588

    Hello friends!

    I have the next:

    my “game-nav.html” file
    my “index.html” file
    my “app.js” file

    Here, my app.js script code:

    var app = angular.module('store',[]);
    return {
        restrict : 'E',
        templateUrl : 'game-nav.html',
        controller : function(){ = 1;
    this.selectTab = function(setTab){ = setTab;
    this.isSelected = function(chekTab){
        return === chekTab;
    controllerAs : 'panel'

    In my index.html I have wrote:


    I have already added ng-app=”store” to html tag.

    When I run the web page the tag doesn’t being interpreted :s just put <game-nav></game-nav> and not the contents file :S

    Somebody can help me?

    Thanks for your time.


    What does your template game-nav.html looks like?

    It appears to be working as far as this following code is concerned, but there could be an issue within your template. Not sure.


    Bro, thanks, I don’t know what happened, I just put your code and all are work!! thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.