Jump to content

Angular js


N3lson

Recommended Posts

Boas alguém que me possa ajudar nos seguinte

Estou a iniciar em angular js, e estou com problema no seguinte:

Estava a usar o sammy's para efectuar o route e depois para efectuar o necessário existia o .then

this.get('#/ofertas', function(context) {

            let $endereco = "./paginas/ofertasV.asp"

            this.load($endereco).then(function(conteudo) {

                $pagina.html(conteudo);
                $("#nomepag").text($txt_contactos);



               $(".btn-ovpendente").on("click", function() {

                    $.ajax({
                        url: "paginas/dtc.asp",
                        method: "get",
                        cache: !1,
                        async: !1,
                        data: { emp: "x", T1: $(this).data("item") },
                        success: function(resp) {
                            $(document).find("#modd").html(resp)
                        }
                    });
                });

            });

        });

Mas agora no angular gostaria de saber como o fazer após ter carregado a view como propagar eventos ou acções

app.config(function($routeProvider) {

    $routeProvider

        .when("/", {

            templateUrl: "./paginas/inicio.asp"

        })

        .when("/ofertas", {

            templateUrl: "./paginas/ofertasV.asp"

        })

});

Agradeço ajuda ou algum link para poder consultar documentação pois no site do angular é um pouco confuso

 

You can't do it, kid. But don't worry, my boy. You're not the only one. No one else can do it.

Link to comment
Share on other sites

Viva,

Está a iniciar em AngularJS por força/obrigação de algum curso que está a fazer ou por iniciativa própria de aprender "Angular"?

Se é por iniciativa própria... esqueça o AngularJS e aceda ao "Angular" (https://angular.io/) este sim interessa (desde Angular 2) aprender nos dias de hoje (já vai na v11 e já trabalho com ele desde a v6).

Para aprender Angular recomendo este curso (aproveite as promoções para comprar a 9,99 ou a 14,99) "Angular - The Complete Guide (2021 Edition)" em "https://www.udemy.com/course/the-complete-guide-to-angular-2/"

Fiz o curso (versão Angular 6)... comprei numa promoção... mas vale até mais do que o valor "real" pedido pelo autor da formação.

cps,

  • Vote 1
Link to comment
Share on other sites

  • 2 weeks later...

Por iniciativa própria, mas para posteriormente poder aplicar em ambiente real, 
Tb ponderei angular mas o entrave é o TypeScript, ainda não entendi a logica da implementação

 

Edited by N3lson

You can't do it, kid. But don't worry, my boy. You're not the only one. No one else can do it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.