Monday, March 20, 2017

Use JQuery inside of angular Controller


Use JQuery inside of angular Controller


In angular all of JQuery functions are not working. But we can do some thing in angular code using JQuery.

See what's are the function can be use in angularjs  Learn >>


1. step - Install JQuery using npm.
 npm install JQuery

2. step - Require JQuery to app.js
var $ = require('jquery');
global.jQuery = require("jquery");
window.$ = $;

3. step - Use inside of angular code
angular.element(document).ready(function () {
   //Your JQuery code.
        //$("#users-icon-container img").attr("src", "ui-need/img/sidebar-icons/users-active.svg");
        //$("#users-icon-container h1").css({"color": "#e62117"});

    });

0 comments:

Post a Comment