Git Product home page Git Product logo

Comments (11)

lemetice avatar lemetice commented on June 25, 2024 1

Hi @dracostheblack , @adonespitogo
Please how did you solde this issue of model not updating in controller?
I am using Angular 1.5.7
I get undefined on debugging.

from angular-base64-upload.

adonespitogo avatar adonespitogo commented on June 25, 2024

It's on-change="fileChanged"

from angular-base64-upload.

dracostheblack avatar dracostheblack commented on June 25, 2024

I fixed that but $scope.attachment is still undefined after I do a file upload

from angular-base64-upload.

adonespitogo avatar adonespitogo commented on June 25, 2024

Can you post your code and angular version?

from angular-base64-upload.

dracostheblack avatar dracostheblack commented on June 25, 2024

Angular is 1.3.6

In my controller all I have is.

$scope.attachment={};

$scope.sendMessage = function () {
    console.log($scope.attachment.filename);
};

<div class="col col-10 text-right">
    <input type="file" ng-model="attachment" class="ion-paperclip text-right float-right attachment" base-sixty-four-input onerror="errorHandler" on-change="fileChanged"/>
</div>           

from angular-base64-upload.

adonespitogo avatar adonespitogo commented on June 25, 2024

Take a look at this plunkr code and see what's missing in your code.

from angular-base64-upload.

dracostheblack avatar dracostheblack commented on June 25, 2024

The only thing different I see is that i'm loading my controller from my module with stateprovider.

    $stateProvider
        .state('inbox.landing', {
            url: '/landing',
            views: {
                'bodyContent': {
                    templateUrl: 'js/modules/inbox/inbox.html',
                    controller: 'InboxCtrl'
                }
            }

from angular-base64-upload.

adonespitogo avatar adonespitogo commented on June 25, 2024

Are you triggering sendMessage() within fileChanged()?

from angular-base64-upload.

dracostheblack avatar dracostheblack commented on June 25, 2024

No, i was just seeing what the value of the attachment, I don't need to use fileChanged if it will update the scope variable.

from angular-base64-upload.

dracostheblack avatar dracostheblack commented on June 25, 2024

Also validation is not firing for me either.

from angular-base64-upload.

sulmanweb avatar sulmanweb commented on June 25, 2024

What is the solution?

from angular-base64-upload.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.